Set user mapping
Set the default user mapping between a provider and an external user on a
connected account. The external user can be identified by ID or by email
address (matched case-insensitively against the connected account's
external users) — exactly one of the two must be provided. email is a
convenience; when it matches no external user, the connected account's
external users are refreshed from the provider and matching is retried once,
so a freshly-added user can be mapped without a manual sync. Matching still
fails with a 422 when the email matches zero (after a successful refresh) or
multiple external users, so integrations that need determinism should resolve
and use external_user_id. When the refresh itself cannot reach the provider
(e.g. the connection needs to be re-authorized), a 502 is returned rather
than a 422.
Setting a mapping replaces any existing mapping for the provider on this connected account, so this operation is an idempotent upsert.
Returns a 404 when the connected account does not exist, is not accessible to the current actor, or is not a conferencing connected account; or when the provider does not exist or has been deactivated.
Authorization
authorization In: header
Path Parameters
The connected account's unique identifier
^cact_\w{12}$The provider's unique identifier
^prov_\w{12}$Request Body
application/json
User mapping params
TypeScript Definitions
Use the request body type in TypeScript.
Request schema for setting a user mapping. Exactly one of external_user_id or email must be provided to identify the external user.
Request schema for setting a user mapping. Exactly one of external_user_id or email must be provided to identify the external user.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/connected_accounts/cact_abcdef123456/user_mappings/prov_abcdef123456" \ -H "Content-Type: application/json" \ -d '{ "external_user_id": "exusr_d025a96ac0c6" }'{ "data": { "external_user": { "email": "dr.smith@example.com", "first_name": "Jane", "id": "exusr_d025a96ac0c6", "last_name": "Smith", "object": "external_user", "status": "active" }, "object": "user_mapping", "provider": { "created_at": "2017-09-12T12:34:55Z", "display_name": "John Smith", "email": "john@example.com", "first_name": "John", "id": "prov_d025a96ac0c6", "last_name": "Smith", "metadata": { "external_id": "123" }, "object": "provider", "time_zone": "America/New_York", "updated_at": "2017-09-13T10:11:12Z" }, "source": "manual" }}List user mappings GET
List the default user mappings between providers and external users for a connected account. Mappings whose provider has been deactivated are not included. Returns a 404 when the connected account does not exist, is not accessible to the current actor, or is not a conferencing connected account.
Sync external users POST
Refresh the external users for a connected account by syncing them from the provider (e.g., pulling the current list of users from a connected Zoom account). New users are added, existing users are updated, and users no longer present at the provider are removed. Returns the full, refreshed list of external users. Returns a 404 when the connected account does not exist, is not accessible to the current actor, or is not a conferencing connected account. Returns a 502 when the provider could not be reached or rejected the request (e.g. the connection needs to be re-authorized).