# Update user

Update role, payment types, and/or delegation settings for an active employee.
All fields in the request body are optional.

Endpoint: PATCH /v1/businesses/{client_id}/users/{user_id}
Version: v1
Security: BearerAuth

## Path parameters:

  - `client_id` (integer, required)
    The ID of the business.
    Example: 123

  - `user_id` (integer, required)
    The ID of the user.

## Request fields (application/json):

  - `role_id` (string)
    The role to assign to the user. Must belong to the same business.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

  - `payment_types` (array)
    The payment types the user can transact with.
    Enum: "bills", "cards", "reimbursements"

  - `out_of_office_mode` (boolean)
    Whether the user is out of office. When true, both start and end dates are required.
    Example: true

  - `out_of_office_start_date` (string)
    First day of the out-of-office period (inclusive).
    Example: "2026-06-01"

  - `out_of_office_end_date` (string)
    Last day of the out-of-office period (inclusive). Must be on or after the start date.
    Example: "2026-06-15"

  - `delegate_approver` (integer,null)
    The user ID to delegate approvals to while out of office. Must belong to the same business and have no overlapping out-of-office period.
    Example: 789

## Response 200 fields (application/json):

  - `id` (integer)
    The ID of the user.
    Example: 123

  - `first_name` (string)
    The first name of the user.
    Example: "John"

  - `last_name` (string)
    The last name of the user.
    Example: "Doe"

  - `name` (string)
    The full name of the user or the display name if the user has set one.
    Example: "John Doe"

  - `email` (string)
    The email of the user.
    Example: "john.doe@example.com"

  - `role` (string)
    The role of the user.
    Example: "Team Member"

  - `role_id` (string)
    The ID of the user's role.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

  - `is_deleted` (boolean)
    Whether the user is deleted.

  - `created` (string)
    The date and time when the user was created in UTC.
    Example: "2024-01-01T00:00:00Z"

  - `updated` (string)
    The date and time when the user was last updated in UTC.
    Example: "2024-01-01T00:00:00Z"

  - `payment_types` (array)
    The payment types the user can transact with.
    Enum: "bills", "cards", "reimbursements"

  - `out_of_office_mode` (boolean)
    Whether the user is out of office.
    Example: true

  - `out_of_office_start_date` (string,null)
    First day of the out-of-office period (inclusive).
    Example: "2026-06-01"

  - `out_of_office_end_date` (string,null)
    Last day of the out-of-office period (inclusive).
    Example: "2026-06-15"

  - `delegate_approver` (integer,null)
    The user ID to delegate approvals to while out of office.
    Example: 789


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields
