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

# Provision a user

> Adds a member to the organization, creating the LangWatch account when the email is new. Someone who already has an account is added and reactivated rather than refused, which is what lets a directory sync be re-run without special-casing the people it already knows. New members join with the MEMBER role at organization scope. `costCenter` on the enterprise user extension assigns their department, creating that department on first use.



## OpenAPI

````yaml POST /api/scim/v2/Users
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/scim/v2/Users:
    post:
      tags:
        - SCIM
      summary: Provision a user
      description: >-
        Adds a member to the organization, creating the LangWatch account when
        the email is new. Someone who already has an account is added and
        reactivated rather than refused, which is what lets a directory sync be
        re-run without special-casing the people it already knows. New members
        join with the MEMBER role at organization scope. `costCenter` on the
        enterprise user extension assigns their department, creating that
        department on first use.
      operationId: scimCreateUser
      parameters: []
      responses:
        '201':
          description: The provisioned user.
          content:
            application/scim+json:
              schema:
                type: object
                properties:
                  schemas:
                    type: array
                    items:
                      type: string
                    description: The SCIM schema URNs this resource conforms to.
                  id:
                    type: string
                    description: >-
                      The LangWatch user id. Use it as the resource id in later
                      calls, and as a member value on a group.
                  userName:
                    type: string
                    format: email
                    description: The member's email address, which is their login.
                  name:
                    type: object
                    properties:
                      givenName:
                        type: string
                      familyName:
                        type: string
                  emails:
                    type: array
                    items:
                      type: object
                      properties:
                        value:
                          type: string
                          format: email
                        primary:
                          type: boolean
                        type:
                          type: string
                  active:
                    type: boolean
                    description: False once the account is deactivated.
                  meta:
                    type: object
                    properties:
                      resourceType:
                        type: string
                      created:
                        type: string
                        format: date-time
                      lastModified:
                        type: string
                        format: date-time
        '400':
          description: >-
            The request body is not JSON, or does not match the SCIM schema for
            this operation.
          content:
            application/scim+json:
              schema:
                type: object
                properties:
                  schemas:
                    type: array
                    items:
                      type: string
                    description: The SCIM schema URNs this resource conforms to.
                  status:
                    type: string
                    description: The HTTP status, as a string.
                  detail:
                    type: string
        '401':
          description: >-
            The Authorization header is missing, is not a bearer token, or names
            a token this deployment does not know.
          content:
            application/scim+json:
              schema:
                type: object
                properties:
                  schemas:
                    type: array
                    items:
                      type: string
                    description: The SCIM schema URNs this resource conforms to.
                  status:
                    type: string
                    description: The HTTP status, as a string.
                  detail:
                    type: string
        '403':
          description: >-
            The token is valid but the organization's plan no longer includes
            SCIM provisioning. Entitlement is checked on every call, so a
            directory connection stops the moment the Enterprise plan lapses.
          content:
            application/scim+json:
              schema:
                type: object
                properties:
                  schemas:
                    type: array
                    items:
                      type: string
                    description: The SCIM schema URNs this resource conforms to.
                  status:
                    type: string
                    description: The HTTP status, as a string.
                  detail:
                    type: string
        '409':
          description: A member with this userName already exists in the organization.
          content:
            application/scim+json:
              schema:
                type: object
                properties:
                  schemas:
                    type: array
                    items:
                      type: string
                    description: The SCIM schema URNs this resource conforms to.
                  status:
                    type: string
                    description: The HTTP status, as a string.
                  detail:
                    type: string
      security:
        - scim_bearer: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.
    scim_bearer:
      type: http
      scheme: bearer
      description: >-
        SCIM token for one organization's directory connection, created with
        POST /api/scim-tokens or in Settings > SCIM. It authenticates
        provisioning calls only, and stops working if the organization's
        Enterprise plan lapses.

````