> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update User

> Updates an existing user's information



## OpenAPI

````yaml /openapi/product/user-api.yaml patch /users/{id}
openapi: 3.0.3
info:
  title: Domo Users API
  description: |
    API for managing Domo Users from outside of your Domo instance, such as:
    - Jupyter scripts
    - Code Engine Functions
    - Custom Java/Node/Python scripts
  version: 1.0.0
  contact:
    name: Domo Support
    url: https://www.domo.com
servers:
  - url: https://{instance}.domo.com
    description: Domo Identity API
    variables:
      instance:
        default: your-instance
        description: Your Domo instance name
security:
  - DeveloperToken: []
tags:
  - name: Users
    description: Operations for managing Domo users
paths:
  /users/{id}:
    patch:
      tags:
        - Users API (Product)
      summary: Update User
      description: Updates an existing user's information
      operationId: updateUser
      parameters:
        - name: id
          in: path
          required: true
          description: Id of the user requested
          schema:
            type: integer
          example: 123456
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
            example:
              roleId: 5
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: Bad request - Invalid input parameters
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '404':
          description: User not found
components:
  schemas:
    UpdateUserRequest:
      type: object
      properties:
        displayName:
          type: string
          description: Display name of the user
          example: John Doe
        emailAddress:
          type: string
          format: email
          description: Email address of the user
          example: john.doe@example.com
        roleId:
          type: integer
          description: Role ID to assign to the user
          example: 5
    User:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the user
          example: 123456
        displayName:
          type: string
          description: Display name of the user
          example: John Doe
        userName:
          type: string
          description: Username of the user
          example: john.doe@example.com
        emailAddress:
          type: string
          format: email
          description: Email address of the user
          example: john.doe@example.com
        roleId:
          type: integer
          description: Role ID assigned to the user
          example: 1
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/UserAttribute'
          description: Custom attributes associated with the user
    UserAttribute:
      type: object
      properties:
        key:
          type: string
          description: Attribute key
          example: department
        values:
          oneOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                type: integer
          description: Attribute values (can be strings or numbers)
          example:
            - Engineering
            - Product
  securitySchemes:
    DeveloperToken:
      type: apiKey
      in: header
      name: X-DOMO-Developer-Token
      description: Domo Developer Token for authentication

````