Map your CRM users to DoubleTick agents

Links each user in your CRM to the DoubleTick agent whose account they sign in as, filling the mapping that Custom CRM embed logins read. Until a CRM user is mapped, minting an embed token for them fails with 403 user_not_mapped and they cannot open DoubleTick inside your CRM. This is the API equivalent of mapping each agent by hand in DoubleTick under Settings → Integrations → Custom CRM.

Before resolving the batch we refresh our copy of your users by calling the List Users API configured on the integration, so a crmUserId must appear in that response to be mappable. Rows are resolved independently and a 200 is returned even when every row fails: a CRM normally contains people who were never invited to DoubleTick, so unmapped rows are expected rather than an error. Read mapped and failed rather than relying on the status code alone.

The call is idempotent, so a batch that timed out can safely be re-sent. It also overwrites: re-sending a mapping replaces whatever that CRM user was mapped to before, including a mapping an admin set by hand in the dashboard. An agent can belong to only one CRM user, so moving an agent to a different CRM user requires clearing the existing mapping first — which this endpoint cannot do yet.

Reassignments are resolved against the mapping as it stood before the call, not against the batch's end result. A row is refused with agent_already_mapped whenever another CRM user held that agent when the call arrived, even if an earlier row in the same batch moves that user elsewhere. Two consequences: a reassignment chain (A takes B's agent while B takes a free one) needs the same batch sent twice — the first call frees the agent, the second claims it — and a straight swap of two agents between two CRM users cannot be expressed through this API at all, because neither row can go first. Swaps must be done in the DoubleTick dashboard. Each agent_already_mapped failure carries ownedByCrmUserId so you can tell which of your own users to clear.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
uuid
required

The Custom CRM integration's identifier, shown in DoubleTick under Settings → Integrations → Custom CRM → View integration details. The same value you pass when minting an embed token.

mappings
array of objects
required
length ≥ 1

One entry per CRM user to map. There is no fixed maximum; the request body is capped at 1 MiB, which is roughly 10,000 entries.

mappings*
string
required

Phone number of the DoubleTick agent this CRM user signs in as. The agent must be an active team member of your organisation (not an AI agent). Send the country code with a leading +, e.g. +919812345678 or +14155550100. Spaces and dashes are ignored. Indian numbers also work without the country code (9812345678). Numbers from any other country must include their country code: a US number sent as 4155550100 is read as an Indian number and the row fails with agent_not_found. A number with no + whose digits can be read both as an Indian number and as a full foreign number is looked up both ways; if the two readings match two different agents, the row fails with agent_not_found rather than guessing.

string
required
length ≤ 255

The user's id in your own CRM, exactly as your List Users API returns it.

Responses

mapped and failed. On a clean run only mapped and failed are present.

400

Request body failed validation, or the integration has no List Users API configured yet (list_users_api_not_configured).

401

Missing or invalid API key.

403

The integration is not connected (integration_disabled), or the API key’s user lacks permission to manage integrations.

404

No Custom CRM integration with this identifier exists in your organisation (integration_not_found).

413

Request body larger than 1 MiB.

429

Rate limit exceeded (60 requests per minute).

502

Your List Users API could not be reached, returned an error, or returned an unexpected shape (EXTERNAL_API_ERROR).

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json