# Update a user

Updates a user by user_id.

Supports partial updates. You can send user_name, user_email, or both. You can also include role_id.

You must provide at least one of user_name or user_email.

If you omit a field, its existing value is preserved.

Endpoint: PUT /users/{user_id}
Version: 1.0.0
Security: basicAuth

## Path parameters:

  - `user_id` (integer, required)
    The unique ID of the user to update
    Example: 837154

## Request fields (application/json):

  - `user_name` (string)
    New name for the user.
    Example: "Abby Smith"

  - `user_email` (string)
    New email address for the user.
    Example: "abby+jackson@signable.co.uk"

  - `role_id` (string)
    Role assigned to the user:
- "1" = User
- "2" = Admin
- "3" = Super-Admin
    Enum: "1", "2", "3"

## Response 200 fields (application/json):

  - `http` (integer)
    Example: 200

  - `message` (string)
    Example: "Abby Smith has been updated in your user list."

  - `href` (string)
    Example: "https://api.signable.co.uk/v1/users/837154"

  - `user_id` (integer)
    Example: 837154

  - `role_id` (string)
    Enum: "1", "2", "3"

  - `user_name` (string)
    Example: "Abby Smith"

  - `user_email` (string)
    Example: "abby+jackson@signable.co.uk"

  - `user_updated` (string)
    Example: "2025-07-07T08:38:54+0000"

## Response 400 fields (application/json):

  - `http` (integer)
    Example: 400

  - `code` (integer)
    Example: 10104

  - `message` (string)
    Example: "The user name and email are missing. Please make sure at least one of them is provided."


