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

# Update a provisioned user

> Applies RFC 7644 section 3.5.2 patch operations. What is implemented: `replace` of `active` (deactivating or reactivating the account), of `userName`, and of `name.givenName` / `name.familyName`, written either as an operation path or as keys inside a value object; and `add`, `replace` or `remove` of the enterprise `costCenter`, which reassigns the member's department. Operations outside that set are accepted and change nothing, so a provider sending its full patch set is never rejected.



## OpenAPI

````yaml PATCH /api/scim/v2/Users/{id}
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/{id}:
    patch:
      tags:
        - SCIM
      summary: Update a provisioned user
      description: >-
        Applies RFC 7644 section 3.5.2 patch operations. What is implemented:
        `replace` of `active` (deactivating or reactivating the account), of
        `userName`, and of `name.givenName` / `name.familyName`, written either
        as an operation path or as keys inside a value object; and `add`,
        `replace` or `remove` of the enterprise `costCenter`, which reassigns
        the member's department. Operations outside that set are accepted and
        change nothing, so a provider sending its full patch set is never
        rejected.
      operationId: scimPatchUser
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The LangWatch user id.
      responses:
        '200':
          description: The updated 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
        '404':
          description: No such member in this 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.

````