# Update a user

Endpoint: PUT /users/{userId}
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `userId` (number, required)

## Request fields (application/json):

  - `firstName` (string, required)
    The first name of the user
    Example: John

  - `lastName` (string, required)
    The last name of the user
    Example: Doe

  - `isEnabled` (boolean)
    Indicates if the user is enabled
    Example: true

  - `isAdmin` (boolean)
    Indicates if the user is an admin
    Example: true

  - `clientAccountId` (array, required)
    List of client account IDs
    Example: [1,2,3]

## Response 200:

  - `200` (unknown)
    The user has been successfully updated.

## Response 400:

  - `400` (unknown)
    Bad request: User not found.

## Response 401:

  - `401` (unknown)
    Unauthorized: Invalid or missing token.

## Response 401 fields (application/json):

  - `message` (string, required)
    Error message indicating unauthorized access.
    Example: Unauthorized

  - `statusCode` (number, required)
    HTTP status code for unauthorized access.
    Example: 401

## Response 403:

  - `403` (unknown)
    Forbidden: You do not have the right permissions.

## Response 404:

  - `404` (unknown)
    User not found.

