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

# Create user



## OpenAPI

````yaml /api-reference/api.yaml post /v1/users
openapi: 3.1.0
info:
  title: Cube Cloud REST API
  version: 1.0.0
  description: >-
    Programmatically manage Cube Cloud: deployments and everything scoped to
    them

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

    plus account-level users, groups, policies, embedding, and AI settings.
servers:
  - url: https://{tenant}.cubecloud.dev/api
    description: >-
      Cube Cloud API base URL. Replace the whole host if you use a custom
      domain.
    variables:
      tenant:
        default: your-tenant
        description: Your Cube Cloud tenant subdomain
security:
  - bearerAuth: []
tags:
  - name: Deployments
  - name: Environments
  - name: Folders
  - name: Reports
  - name: Workbooks
  - name: Notifications
  - name: Workspace
  - name: User Attributes
  - name: App Theme
  - name: Embed
  - name: Embed Tenants
  - name: Dbt Sync
  - name: Env Variables
  - name: OAuth Integrations
  - name: OIDC Token Configs
  - name: Regions
  - name: Tenant Settings
  - name: User Attribute Values
  - name: User OAuth Tokens
  - name: Users Admin
paths:
  /v1/users:
    post:
      tags:
        - Users Admin
      summary: Create user
      operationId: createUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateInput'
        description: UserCreateInput
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: ''
components:
  schemas:
    UserCreateInput:
      properties:
        defaultRoles:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
        email:
          type: string
        externalId:
          oneOf:
            - type: string
            - type: 'null'
        firstName:
          oneOf:
            - type: string
            - type: 'null'
        isAdmin:
          oneOf:
            - type: boolean
            - type: 'null'
        password:
          oneOf:
            - type: string
            - type: 'null'
        username:
          type: string
      required:
        - email
        - username
      type: object
    User:
      properties:
        activeRoleId:
          oneOf:
            - type: integer
            - type: 'null'
        aliases:
          oneOf:
            - items:
                $ref: '#/components/schemas/UserAlias'
              type: array
            - type: 'null'
        createdAt:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        defaultRoles:
          oneOf:
            - items:
                type: string
              type: array
            - type: 'null'
        email:
          type: string
        externalId:
          oneOf:
            - type: string
            - type: 'null'
        firstName:
          oneOf:
            - type: string
            - type: 'null'
        gitUser:
          oneOf:
            - type: string
            - type: 'null'
        id:
          type: integer
        impersonation:
          oneOf:
            - $ref: '#/components/schemas/UserImpersonationDTO'
            - type: 'null'
        isAdmin:
          type: boolean
        isDeactivated:
          oneOf:
            - type: boolean
            - type: 'null'
        lastLogin:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        notifications:
          additionalProperties: true
          type: object
        picture:
          oneOf:
            - type: string
            - type: 'null'
        samlId:
          oneOf:
            - type: string
            - type: 'null'
        settings:
          oneOf:
            - $ref: '#/components/schemas/UserSettingsInput'
            - type: 'null'
        title:
          oneOf:
            - type: string
            - type: 'null'
        tosAccepted:
          oneOf:
            - type: object
            - type: 'null'
        updatedAt:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        username:
          type: string
      required:
        - id
        - email
        - username
        - isAdmin
        - notifications
      type: object
    UserAlias:
      properties:
        createdAt:
          pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?
          type: string
        id:
          type: integer
        source:
          $ref: '#/components/schemas/UserAliasDTOSource'
        updatedAt:
          pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?
          type: string
        userId:
          type: integer
        username:
          type: string
      required:
        - id
        - userId
        - username
        - source
        - createdAt
        - updatedAt
      type: object
    UserImpersonationDTO:
      properties:
        expiresAt:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
        impersonatedUser:
          oneOf:
            - $ref: '#/components/schemas/User'
            - type: 'null'
        startedAt:
          oneOf:
            - oneOf:
                - format: date
                  type: string
                - format: date-time
                  type: string
            - type: 'null'
      type: object
    UserSettingsInput:
      properties:
        alternatingRowColors:
          oneOf:
            - type: boolean
            - type: 'null'
        lastSeenChangelogId:
          oneOf:
            - type: integer
            - type: 'null'
        locale:
          oneOf:
            - type: string
            - type: 'null'
        theme:
          oneOf:
            - type: string
            - type: 'null'
        timezone:
          oneOf:
            - type: string
            - type: 'null'
      type: object
    UserAliasDTOSource:
      enum:
        - ldap
        - saml
        - scim
        - manual
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Token authentication. Send `Authorization: Bearer <YOUR_TOKEN>`.'

````