> ## 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

> Provisions a new user.



## OpenAPI

````yaml /api-reference/scim.yaml post /scim/v2/Users
openapi: 3.1.0
info:
  title: Cube Cloud SCIM API
  version: 1.0.0
  description: >
    The SCIM 2.0 API lets identity providers (Okta, Azure AD/Entra ID, OneLogin,

    and others) provision and de-provision users and groups in Cube Cloud

    automatically. It implements the System for Cross-domain Identity Management

    protocol as defined in [RFC
    7643](https://datatracker.ietf.org/doc/html/rfc7643)

    and [RFC 7644](https://datatracker.ietf.org/doc/html/rfc7644).


    ## Base URL


    All SCIM endpoints live under the `/scim/v2` namespace on your Cube Cloud

    tenant's API host:


    ```text

    https://<tenant>.cubecloud.dev/api/scim/v2

    ```


    Replace `<tenant>` with your Cube Cloud subdomain, or swap the whole host

    if your account uses a custom domain.


    ## Authentication


    SCIM requests are authenticated with a bearer token issued from your Cube

    Cloud account settings. Include it in the `Authorization` header:


    ```text

    Authorization: Bearer <YOUR_SCIM_TOKEN>

    ```


    ## Content type


    Requests and responses use `application/json`. The SCIM media type

    `application/scim+json` is also accepted.
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: SCIM Users
    description: Provision, read, update, and de-provision users.
  - name: SCIM Groups
    description: Provision, read, update, and de-provision groups and their memberships.
paths:
  /scim/v2/Users:
    post:
      tags:
        - SCIM Users
      summary: Create user
      description: Provisions a new user.
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/User'
            example:
              schemas:
                - urn:ietf:params:scim:schemas:core:2.0:User
              userName: jane@example.com
              name:
                givenName: Jane
                familyName: Doe
              emails:
                - value: jane@example.com
                  primary: true
              active: true
      responses:
        '201':
          description: The created user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
components:
  schemas:
    User:
      type: object
      description: A SCIM 2.0 core User resource.
      required:
        - userName
      properties:
        schemas:
          type: array
          items:
            type: string
          example:
            - urn:ietf:params:scim:schemas:core:2.0:User
        id:
          type: string
          description: Unique identifier assigned by Cube Cloud. Read-only.
          readOnly: true
        userName:
          type: string
          description: Unique identifier for the user, typically their email address.
        name:
          type: object
          properties:
            givenName:
              type: string
            familyName:
              type: string
        emails:
          type: array
          items:
            type: object
            properties:
              value:
                type: string
              primary:
                type: boolean
        active:
          type: boolean
          description: Whether the user is active. Set to `false` to deactivate.
        externalId:
          type: string
          description: Identifier of the user as defined by the provisioning client.
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      readOnly: true
      properties:
        resourceType:
          type: string
        created:
          type: string
          format: date-time
        lastModified:
          type: string
          format: date-time
        location:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: SCIM bearer token issued from your Cube Cloud account settings.

````