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

# Edit a user

> A `PUT` to the `/users/{userId}` endpoint allows your application to edit a specific user.



## OpenAPI

````yaml put /v3/users/{user}
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/users/{user}:
    put:
      tags:
        - User
      summary: Edit a user
      description: >-
        A `PUT` to the `/users/{userId}` endpoint allows your application to
        edit a specific user.
      operationId: users.update
      parameters:
        - name: user
          in: path
          required: true
          description: The user ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUser'
      responses:
        '200':
          description: '`User`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/User'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateUser:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
          format: email
        throttle:
          type:
            - integer
            - 'null'
        password:
          type: string
          minLength: 8
        old_password:
          type: string
        password_confirmation:
          type: string
          minLength: 8
        roles:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
            required:
              - id
          minItems: 1
      title: UpdateUser
    User:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
        throttle:
          type:
            - integer
            - 'null'
        roles:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              handle:
                type: string
            required:
              - id
              - handle
        permissions:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              handle:
                type: string
            required:
              - id
              - handle
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - email
        - throttle
        - roles
        - permissions
        - created_at
        - updated_at
      title: User
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````