> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/reference/create-update-users).



## OpenAPI

````yaml POST /v1/user/{distinct_id}/tenant/{tenant_id}/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/user/{distinct_id}/tenant/{tenant_id}/:
    post:
      summary: Upsert User Tenant Profile
      description: >-
        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](/reference/create-update-users).
      operationId: upsert-user-tenant-profile
      parameters:
        - name: distinct_id
          in: path
          description: >-
            Unique identifier of the user in your system. The user's global
            profile must exist before you upsert a per-tenant profile.
          schema:
            type: string
          required: true
        - name: tenant_id
          in: path
          description: >-
            Tenant to scope the profile update to. Tenant must exist in the
            workspace.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            example:
              $email:
                - user@acme-corp.com
              $sms:
                - '+1234567890'
              $whatsapp:
                - '+1234567890'
              $inbox:
                - 4nlPk4XXLcDxxxHQ70xx2Cx24
              $webpush:
                - token: webpush_token_abc123
                  endpoint: https://fcm.googleapis.com/fcm/send/abc123
                  keys:
                    p256dh: BNJxwH...
                    auth: tBH...
              $androidpush:
                - android_push_token_xyz987
              $iospush:
                - ios_push_token_lmn456
              $slack:
                - email: user@acme-corp.com
                  access_token: xoxb-XXXXXXXX
              $timezone: America/New_York
              $preferred_language: en
              role: admin
            schema:
              type: object
              description: >-
                Per-tenant profile payload. Same channel and property keys as
                [Create / Update Users](/reference/create-update-users). Any key
                set here becomes the per-tenant override; keys omitted here fall
                through to the global profile at send time.
              properties:
                $email:
                  type: array
                  items:
                    type: string
                    format: email
                  description: List of email addresses to set on the per-tenant profile.
                $sms:
                  type: array
                  items:
                    type: string
                  description: List of phone numbers for SMS on the per-tenant profile.
                $whatsapp:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of phone numbers for WhatsApp on the per-tenant
                    profile.
                $inbox:
                  type: array
                  items:
                    type: string
                  description: List of inbox identifiers on the per-tenant profile.
                $androidpush:
                  type: array
                  items:
                    type: string
                  description: >-
                    Android push tokens on the per-tenant profile. Use this to
                    isolate device tokens per tenant / app install.
                $iospush:
                  type: array
                  items:
                    type: string
                  description: iOS push tokens on the per-tenant profile.
                $webpush:
                  type: array
                  description: Web push subscription objects on the per-tenant profile.
                  items:
                    type: object
                $slack:
                  type: array
                  description: >-
                    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.
                  items:
                    type: object
                $ms_teams:
                  type: array
                  description: >-
                    Microsoft Teams channel configuration on the per-tenant
                    profile. Same shape as the global profile.
                  items:
                    type: object
                $timezone:
                  type: string
                  description: IANA timezone for the per-tenant profile.
                  example: America/New_York
                $preferred_language:
                  type: string
                  description: Preferred language code for the per-tenant profile.
                  example: en
                $locale:
                  type: string
                  description: Locale for the per-tenant profile.
                  example: en_GB
              additionalProperties:
                description: >-
                  Any custom property to set on the per-tenant profile.
                  Overrides the same key on the global profile at send time.
      responses:
        '201':
          description: >-
            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`.
          content:
            application/json:
              examples:
                Result:
                  value:
                    distinct_id: user@example.com
                    properties:
                      $timezone: America/New_York
                      $preferred_language: en
                      role: admin
                    created_at: '2022-02-13T12:47:00.388999+00:00'
                    updated_at: '2026-07-21T09:49:36.383794+00:00'
                    $email:
                      - value: user@acme-corp.com
                        status: active
                        perma_status: active
                    $slack:
                      - value_json:
                          email: user@acme-corp.com
                          access_token: xoxb-XXXXXXXX
                        status: active
                        perma_status: active
                    tenant:
                      tenant_id: acme-corp
                      properties:
                        $timezone: America/New_York
                        $preferred_language: en
                        role: admin
                      $email:
                        - value: user@acme-corp.com
                          status: active
                          perma_status: active
                      $slack:
                        - value_json:
                            email: user@acme-corp.com
                            access_token: xoxb-XXXXXXXX
                          status: active
                          perma_status: active
              schema:
                type: object
                properties:
                  distinct_id:
                    type: string
                    description: The user identifier the operation applied to.
                    example: user@example.com
                  properties:
                    type: object
                    description: >-
                      Merged (effective) properties — global properties layered
                      with per-tenant overrides.
                  created_at:
                    type: string
                    format: date-time
                    description: Timestamp when the user was originally created.
                  updated_at:
                    type: string
                    format: date-time
                    description: >-
                      Timestamp when the user was last updated (global or
                      per-tenant).
                  tenant:
                    type: object
                    description: >-
                      The per-tenant override block for the tenant the request
                      targeted. Contains only the fields explicitly set at the
                      tenant level, not the merged view.
                    properties:
                      tenant_id:
                        type: string
                        description: Tenant this override belongs to.
                        example: acme-corp
                      properties:
                        type: object
                        description: Properties explicitly set on the per-tenant profile.
        '400':
          description: >-
            400 - Bad Request. Returned when `user_tenancy_mode` is `exclusive`
            and the user is already associated with a different tenant.
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 400
                    message: >-
                      user is already associated with a different tenant;
                      workspace is in exclusive mode
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                    example: 400
                  message:
                    type: string
                    description: Human-readable error description.
                    example: >-
                      user is already associated with a different tenant;
                      workspace is in exclusive mode
        '404':
          description: 404 - Not Found. Returned when the tenant does not exist.
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    message: tenant 'acme-corp' not found
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                    example: 404
                  message:
                    type: string
                    description: Human-readable error description.
                    example: tenant 'acme-corp' not found
      deprecated: false
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: cURL
          label: Upsert user tenant profile
          source: >
            curl -X POST
            "https://hub.suprsend.com/v1/user/user@example.com/tenant/acme-corp/"
            \
              --header 'Authorization: Bearer __YOUR_API_KEY__' \
              --header 'Content-Type: application/json' \
              --data '{
                "$email": ["user@acme-corp.com"],
                "$slack": [{ "email": "user@acme-corp.com", "access_token": "xoxb-XXXXXXXX" }],
                "$timezone": "America/New_York",
                "$preferred_language": "en",
                "role": "admin"
              }'
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````