# Update teammate office hours in bulk

You can assign or clear office hours schedules for up to 50 teammates in one request. Send a non-empty `assignments` array, with each teammate listed at most once. Each teammate and each non-null schedule must belong to your workspace, and each teammate must be accessible to you.
Set `office_hours_schedule_id` to `null` to remove a teammate's own schedule so they inherit office hours. Sending the current value, including `null` for a teammate who already inherits, is a no-op that changes nothing.
The update is all-or-nothing: if any assignment is invalid or cannot be saved, none of the assignments are changed. Errors for invalid entries identify them by their zero-based index. The response contains the submitted teammates in request order, including unchanged assignments, and has no pagination.
Requires the `read_write_office_hours` OAuth scope and permission to access reporting. Set `Intercom-Version: Preview`.

Endpoint: PUT /admins/office_hours
Version: Preview
Security: bearerAuth

## Header parameters:

  - `Intercom-Version` (string)

## Request fields (application/json):

  - `assignments` (array, required)
    The teammates and their new schedule ids. Each teammate must belong to your workspace, be accessible to you, and appear at most once.
    Example: [{"admin_id":"456","office_hours_schedule_id":"123"},{"admin_id":"789","office_hours_schedule_id":null}]

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

  - `assignments.office_hours_schedule_id` (string, required)
    The id of an office hours schedule in your workspace, or null to remove the teammate's own schedule so they inherit office hours.
    Example: 123

## Response 200 fields (application/json):

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

  - `data` (array, required)
    The teammates' office hours assignments.
    Example: [{"type":"admin_office_hours","admin_id":"456","office_hours_schedule_id":"123"}]

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

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

  - `data.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 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

