Skip to content

Calling the APIs

Reviewed preview means the operation and example fields were checked against repository contracts on November 19, 2026. It does not mean the contract is stable, deployed to your environment or verified for production use. These are selected integration references, not an exhaustive inventory of internal APIs.

Planned means the interface is not published for integration. Do not code against a proposed name or infer a URL from another module.

Reviewed Custom APIs use an unbound action with a Request string and a Response string. Serialize the inner request once, then serialize the outer body. Parse the response envelope, then parse its Response property.

HTTP request body — example
{"Request":"{\"query\":\"account\",\"top\":20}"}
HTTP response body — illustrative empty result
{"Response":"{\"results\":[],\"truncated\":false}"}

Examples on module pages show the inner JSON, unless labeled otherwise. A response excerpt omits unrelated fields intentionally. Empty results illustrate shape, not a guarantee that a caller can access a particular record.

pfx_ in these pages is a publisher-prefix token. Resolve the actual Custom API unique name from the installed solution or environment metadata. Do not send the token literally or assume all installations use the same prefix.

The following browser example belongs inside an authenticated model-driven app. Supply the verified operation name from your deployment configuration. It is not executable on this documentation website.

Call a reviewed action from a model-driven app
async function callSwitchboard(operationName, input) {
const request = {
Request: JSON.stringify(input),
getMetadata: () => ({
boundParameter: null,
operationName,
operationType: 0,
parameterTypes: {
Request: { typeName: 'Edm.String', structuralProperty: 1 }
}
})
};
const result = await Xrm.WebApi.online.execute(request);
if (!result.ok) throw new Error(`Request failed (${result.status})`);
const envelope = await result.json();
if (typeof envelope.Response !== 'string') {
throw new Error('The operation returned no JSON Response string.');
}
return JSON.parse(envelope.Response);
}
  • Dataverse can reject the request before module code runs: authentication, privilege or malformed input errors are not successful responses.
  • A successful HTTP response can still contain validation errors, warnings or an operation-specific refusal. Read the documented result before continuing.
  • Do not assume every API exposes ok, or that Validate and Preview have identical permissions across modules.
  • Do not automatically retry writes. An operation may already have created records, allocated a number or started a job.
  • Keep correlation IDs and operation names in diagnostics. Redact payloads and personal data.

Pin your integration to a tested solution version. Exercise success, denied access, invalid input, empty results and timeouts before upgrading. Preview interfaces can change; treat changes in request fields, permissions and side effects as review items.