v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Upsert User Tenant Profile

Adds or updates the per-tenant profile for a user. Fields you set here override the user's global profile when the workflow is triggered with tenant_id. Body accepts the same shape as Create / Update Users.

post/v1/user/{distinct_id}/tenant/{tenant_id}/

Path parameters

distinct_idstring required

Unique identifier of the user in your system. The user's global profile must exist before you upsert a per-tenant profile.

tenant_idstring required

Tenant to scope the profile update to. Tenant must exist in the workspace.

Request body

$emailstring[]

List of email addresses to set on the per-tenant profile.

$smsstring[]

List of phone numbers for SMS on the per-tenant profile.

$whatsappstring[]

List of phone numbers for WhatsApp on the per-tenant profile.

$inboxstring[]

List of inbox identifiers on the per-tenant profile.

$androidpushstring[]

Android push tokens on the per-tenant profile. Use this to isolate device tokens per tenant / app install.

$iospushstring[]

iOS push tokens on the per-tenant profile.

$webpushobject[]

Web push subscription objects on the per-tenant profile.

$slackobject[]

Slack channel configuration on the per-tenant profile. Same shape as the global profile — email + access_token, user_id + access_token, channel + access_token, or incoming_webhook.

$ms_teamsobject[]

Microsoft Teams channel configuration on the per-tenant profile. Same shape as the global profile.

$timezonestring

IANA timezone for the per-tenant profile.

$preferred_languagestring

Preferred language code for the per-tenant profile.

$localestring

Locale for the per-tenant profile.

Example request

{
  "$timezone": "America/New_York",
  "$preferred_language": "en",
  "$locale": "en_GB"
}

Response

201 - Created. The response is the full user object with the merged (effective) profile at the top level and the per-tenant override under tenant.

distinct_idstring

The user identifier the operation applied to.

propertiesobject

Merged (effective) properties — global properties layered with per-tenant overrides.

created_atstring date-time

Timestamp when the user was originally created.

updated_atstring date-time

Timestamp when the user was last updated (global or per-tenant).

Example response

{
  "distinct_id": "user@example.com",
  "tenant": {
    "tenant_id": "acme-corp"
  }
}