# Update team office hours

You can assign an office hours schedule to a team or set `office_hours_schedule_id` to `null` to remove the team's own schedule so it uses the workspace default. The field is required, even when its value is `null`.
The team and any non-null schedule must belong to your workspace. An unknown, malformed, or other-workspace team id returns a `404` error. An unknown, invalid, or other-workspace schedule id returns a `422` error. Sending the current value, including `null` for a team already using the workspace default, changes nothing.
Returns the same schedule object as `GET /teams/{team_id}/office_hours`. If removing the assignment leaves the team without a schedule and the workspace has no default, the assignment is removed but the response is a `404` error.
Requires the `read_write_office_hours` OAuth scope and permission to manage workload management. Set `Intercom-Version: Preview`.

Endpoint: PUT /teams/{team_id}/office_hours
Version: Preview
Security: bearerAuth

## Path parameters:

  - `team_id` (string, required)
    The unique identifier of the team. Use `GET /teams` to list available team IDs.

## 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)
    The type of the object - always `office_hours_schedule`.
    Example: office_hours_schedule

  - `id` (string)
    The unique identifier for the office hours schedule.
    Example: 123

  - `name` (string)
    The name of the office hours schedule.
    Example: Standard Support Hours

  - `time_zone_name` (string)
    The IANA time zone the schedule's hours are evaluated in.
    Example: America/New_York

  - `time_intervals` (array)
    The open intervals that make up the weekly schedule.

  - `time_intervals.start_minute` (integer)
    Minute the interval starts. For schedules, offset from the start of the week (Monday 00:00 = 0); for exceptions, offset from midnight on `exception_date`.
    Example: 540

  - `time_intervals.end_minute` (integer)
    Minute the interval ends. For schedules, offset from the start of the week (Monday 00:00 = 0); for exceptions, offset from midnight on `exception_date`.
    Example: 1020

  - `time_intervals.day_of_week` (integer)
    Derived day of the week the interval falls on (0 = Monday … 6 = Sunday). For exceptions, this is derived from `exception_date`. It is returned in responses only; a request that includes it is rejected with a 400 error.
    Example: 0

  - `twenty_four_seven` (boolean)
    Whether the schedule is open 24/7.
    Example: false

  - `created_at` (integer)
    The time the schedule was created as a Unix timestamp.
    Example: 1717200000

  - `updated_at` (integer)
    The time the schedule was last updated as a Unix timestamp.
    Example: 1717200000

## 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 404 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

