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

# Update a user



## OpenAPI

````yaml /api-reference/admin/admin-openapi.yml patch /projects/{projectId}/customers/{customerId}/users/{userId}
openapi: 3.1.0
info:
  title: Admin API
  version: 0.1.0
  description: >
    The Admin API provides programmatic access to Corti's self-service Console
    platform. This API is intended for administrators.
servers:
  - url: https://api.console.corti.app/functions/v1/public
    description: Production Admin API
security: []
tags:
  - name: Auth
    description: Operations related to authentication
  - name: Customers
    description: Operations related to customer management
  - name: Users
    description: Operations related to user management
paths:
  /projects/{projectId}/customers/{customerId}/users/{userId}:
    patch:
      tags:
        - Users
      summary: Update a user
      parameters:
        - $ref: '#/components/parameters/ProjectId'
        - $ref: '#/components/parameters/CustomerId'
        - $ref: '#/components/parameters/UserId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstName:
                  type: string
                  example: John
                  description: User's first name
                lastName:
                  type: string
                  example: Doe
                  description: User's last name
                enabled:
                  type: boolean
                  example: true
                  description: Flag indicating if the user account is active
                password:
                  type: string
                  example: My$ecureP@ssw0rd123!
                  minLength: 16
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9!@#$%^&*()_+]{16,64}$
                  description: New password for the user
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - BearerAuth: []
components:
  parameters:
    ProjectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
        example: consoleproject
      description: >
        Unique identifier of your project in the Corti API Console.


        To find it, open your project at
        [console.corti.app](https://console.corti.app/), go to Settings, and
        copy the value from the Project ID field.
    CustomerId:
      name: customerId
      in: path
      required: true
      schema:
        type: string
        example: contosohospital
      description: The unique identifier for a Customer
    UserId:
      name: userId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 123e4567-e89b-12d3-a456-426614174000
      description: The ID of the user
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
          description: Unique identifier for the user
        email:
          type: string
          format: email
          example: user@example.com
          description: User's email address
        firstName:
          type: string
          example: John
          description: User's first name
        lastName:
          type: string
          example: Doe
          description: User's last name
        emailVerified:
          type: boolean
          example: true
          default: false
          description: Flag indicating whether the user's email address has been verified
        enabled:
          type: boolean
          example: true
          default: true
          description: Flag indicating if the user account is active
        createdAt:
          type: string
          format: date-time
          example: '2023-10-01T12:00:00Z'
          description: Timestamp when the user was created
      required:
        - email
        - firstName
        - lastName
        - enabled
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
        details:
          type: object
          additionalProperties: true
          description: Additional error details
      required:
        - error
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Entity not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailable:
      description: External service unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT access token obtained from the /auth/token endpoint.


        > This `Admin API` is separate from the `Corti API` used for speech
        recognition, text generation, and agentic workflows. Authentication and
        scope for the `Admin API` uses email-and-password to obtain a bearer
        token via
        [/auth/token](/api-reference/admin/auth/authenticate-user-and-get-access-token).
        This token is only used for API administration.

````