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

# Update User

> Modify a given `User`.

Fields not included in the request body will not be modified.



## OpenAPI

````yaml api-reference/openapi.json put /users
openapi: 3.1.0
info:
  title: Endpoints
  version: '1.0'
servers:
  - url: https://api.contextual.ai/v1
security:
  - BearerAuth: []
paths:
  /users:
    put:
      tags:
        - /users
      summary: Update User
      description: |-
        Modify a given `User`.

        Fields not included in the request body will not be modified.
      operationId: update_user_users_put
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantNewUserInfo'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmptyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TenantNewUserInfo:
      properties:
        email:
          type: string
          title: Email
          description: The email of the user
        is_tenant_admin:
          type: boolean
          title: Is Tenant Admin
          description: Flag indicating if the user is a tenant admin
          default: false
        roles:
          items:
            $ref: '#/components/schemas/UserRolesEnum'
          type: array
          title: Roles
          description: The user level roles of the user.
      type: object
      required:
        - email
      title: TenantNewUserInfo
      description: The schema used for creating new users or updating existing users.
    EmptyResponse:
      properties: {}
      type: object
      title: EmptyResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserRolesEnum:
      type: string
      enum:
        - VISITOR
        - AGENT_USER
        - CUSTOMER_USER
        - CUSTOMER_INTERNAL_USER
        - CONTEXTUAL_STAFF_USER
        - CONTEXTUAL_EXTERNAL_STAFF_USER
        - CONTEXTUAL_INTERNAL_STAFF_USER
        - TENANT_ADMIN
        - CUSTOMER_ADMIN
        - CONTEXTUAL_ADMIN
        - SUPER_ADMIN
        - SERVICE_ACCOUNT
      title: UserRolesEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````