> ## Documentation Index
> Fetch the complete documentation index at: https://cubed3-mikhail-cub-3599-rebuild-driver-on-config-change.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Provision an embed user



## OpenAPI

````yaml /api-reference/api.yaml post /api/v1/embed-tenants/{embedTenantName}/user
openapi: 3.1.0
info:
  title: Cube Platform API
  version: 1.0.0
  description: >-
    Programmatically manage Cube: deployments and everything scoped to them

    (environments, folders, reports, workbooks, notifications, workspace, and
    agents),

    plus account-level users, groups, policies, embedding, and AI settings.
    Data-model

    authoring, dev mode, branches, and uploads live under /build/api/v1 — same
    host and

    token, routed to the build pods.
servers:
  - url: https://{tenant}.cubecloud.dev
    description: Your tenant host. Replace the whole host if you use a custom domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Deployment Creation
  - name: Environments
  - name: Env Variables
  - name: Regions
  - name: Data Model
  - name: Data Model Uploads
  - name: GitHub
  - name: GitHub Connection
  - name: dbt Sync
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: Users
  - name: Users Admin
  - name: User Attributes
  - name: User Attribute Values
  - name: Tenant Settings
  - name: OAuth Integrations
  - name: User OAuth Tokens
  - name: OIDC Token Configs
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dashboard Embed Access
  - name: Usage Analytics
  - name: OpenAPI Spec
paths:
  /api/v1/embed-tenants/{embedTenantName}/user:
    post:
      tags:
        - Embed Tenants
      summary: Provision an embed user
      operationId: provisionEmbedUser
      parameters:
        - in: path
          name: embedTenantName
          required: true
          schema:
            type: string
          description: >-
            Name of the embed tenant (the `embedTenantName` used to generate
            embed sessions).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProvisionEmbedUserInput'
        description: ProvisionEmbedUserInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbedUser'
          description: ''
components:
  schemas:
    ProvisionEmbedUserInput:
      properties:
        email:
          oneOf:
            - format: email
              type: string
            - type: 'null'
          description: >-
            Email address, shown wherever the user is listed and searchable
            through `GET /embed-tenants/{embedTenantName}/users`. Must be a
            valid address, and is stored lowercased. Omit it and Cube derives a
            synthetic `{externalId}@cubecloud.dev` placeholder instead, which is
            what makes a user hard to recognise in a list. Supplying it again
            later updates the stored address.
        externalId:
          description: >-
            The id your own system knows this user by — the same `externalId`
            you will pass to `generate-session`. Trimmed and lowercased before
            it is stored, so casing never produces a second user.
          minLength: 1
          type: string
        groups:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Global, account-wide groups (the `groups` field of
            `generate-session`) that gate data-model access. They must already
            exist. Supplying the field REPLACES the user’s global groups; omit
            it to leave them untouched, pass `[]` to clear them.
        tenantGroups:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: >-
            Groups belonging to this embed tenant (the `tenantGroups` field of
            `generate-session`), which scope content sharing and organization
            within the tenant. Create them first via `POST
            /embed-tenants/{embedTenantName}/groups`. Supplying the field
            REPLACES the user’s tenant groups; omit it to leave them untouched,
            pass `[]` to clear them.
        userProfile:
          oneOf:
            - $ref: '#/components/schemas/EmbedUserProfile'
              type: object
            - type: 'null'
          description: >-
            Display name and avatar. `displayName` is the name shown wherever
            the user appears, including on content they author. Omitted fields
            keep their current value.
      required:
        - externalId
      type: object
    EmbedUser:
      properties:
        createdAt:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        email:
          oneOf:
            - type: string
            - type: 'null'
        externalId:
          oneOf:
            - type: string
            - type: 'null'
        firstName:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        lastLogin:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        username:
          type: string
      required:
        - id
        - username
      type: object
    EmbedUserProfile:
      properties:
        displayName:
          oneOf:
            - type: string
            - type: 'null'
        picture:
          oneOf:
            - format: url
              type: string
            - type: 'null'
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````