# Update teammate office hours

You can assign an office hours schedule to a teammate or set `office_hours_schedule_id` to `null` to remove their own schedule so they inherit office hours. The field is required, even when its value is `null`.
The teammate and any non-null schedule must belong to your workspace, and the teammate must be accessible to you. Sending the current value, including `null` for a teammate who already inherits, is a no-op that changes nothing. Returns the same assignment object as `GET /admins/{id}/office_hours`.
Requires the `read_write_office_hours` OAuth scope and permission to access reporting. Set `Intercom-Version: Preview`.

Endpoint: PUT /admins/{id}/office_hours
Version: Preview
Security: bearerAuth

## Path parameters:

  - `id` (string, required)
    The unique identifier of the teammate.

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `office_hours_schedule_id` (string, required)
    The id of an office hours schedule in your workspace. Set to null to remove the team's or teammate's own schedule. Required even when null.
    Example: 123

## Response 200 fields (application/json):

  - `type` (string, required)
    The type of the object, always `admin_office_hours`.
    Enum: "admin_office_hours"

  - `admin_id` (string, required)
    The unique identifier of the teammate.
    Example: 456

  - `office_hours_schedule_id` (string, required)
    The teammate's own office hours schedule id, or null if they inherit office hours. This is not the id of the inherited schedule.
    Example: 123

## Response 400 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 403 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 422 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

