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

# Update a user

> Update a user



## OpenAPI

````yaml /api-reference/bundled.yaml patch /v0/settings/user
openapi: 3.1.0
info:
  title: Gable API
  description: >
    API to interact with the Gable platform

    ## Authorization

    All API requests require an API key to be passed in the `X-API-KEY` header.
    For instructions on finding your API key and api endpoint check out the [API
    Key documentation](../docs/api-keys.md).

    Example: `curl -H "X-API-KEY: <your-api-key>"
    https://api-{organization}.gable.ai/v0/ping`
  contact:
    name: Gable Engineering
    url: https://gable.ai
    email: engineers@gable.ai
  version: 1.28.0
servers:
  - url: https://{hostname}.gable.ai
    description: Gable API
    variables:
      hostname:
        default: demo-api
        description: Customer environment assigned by Gable
security:
  - ApiKeyAuth: []
tags:
  - name: action
  - name: api-keys
  - name: auth
  - name: changelog
  - name: config
  - name: contract
  - name: data-asset
  - name: debug
  - name: s3
  - name: settings
  - name: slack
  - name: sso
  - name: webhook
  - name: notifications
  - name: constraints
  - name: telemetry
  - name: component
  - name: components
  - name: sca
  - name: cross-service-components
  - name: lineage
  - name: events
  - name: measurements
  - name: defect-report
  - name: experimental
paths:
  /v0/settings/user:
    patch:
      tags:
        - settings
      summary: Update a user
      description: Update a user
      operationId: updateUser
      requestBody:
        description: User
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
      responses:
        '200':
          description: User was updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateUserRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: The email address of the user, which is the primary ID in Gable
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$
        firstName:
          type: string
          description: The first name of the user
        lastName:
          type: string
          description: The last name of the user
        githubHandle:
          type: string
          description: The GitHub handle of the user
          pattern: ^[a-zA-Z0-9-]*$
        role:
          $ref: '#/components/schemas/UserRole'
          description: The role of the user
    UpdateUserResponse:
      type: object
      required:
        - email
        - role
      properties:
        email:
          type: string
          description: The email address of the user, which is the primary ID in Gable
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$
        firstName:
          type: string
          description: The first name of the user
        lastName:
          type: string
          description: The last name of the user
        githubHandle:
          type: string
          description: The GitHub handle of the user
        role:
          $ref: '#/components/schemas/UserRole'
          description: The role of the user
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        id:
          type: number
        title:
          type: string
        message:
          type: string
    UserRole:
      type: string
      enum:
        - ADMIN
        - EDITOR
        - VIEWER
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````