POST/office_hours_schedules

Create an office hours schedule

Creates a recurring weekly office hours schedule for the workspace. Provide its name, time_zone_name, and time_intervals; set each interval's start and end on 15-minute boundaries. The response includes the created schedule and its identifier.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
Intercom-Versionstringoptional
Selects the Intercom API version. Defaults to `2.17` when omitted; the schema defines the accepted version values.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

New office hours schedule details. name, time_zone_name, and time_intervals are required.

namestringrequired
The name of the office hours schedule.
time_zone_namestringrequired
The IANA time zone the schedule's hours are evaluated in.
time_intervalsarray<OfficeHoursTimeInterval>required
The open intervals for the schedule. `start_minute` and `end_minute` must be on a 15-minute boundary.

3 status codes
201Returns the created office hours schedule, including its identifier, name, time zone, weekly intervals, 24/7 setting, and creation and update timestamps.
typestringoptional
The type of the object - always `office_hours_schedule`.
idstringoptional
The unique identifier for the office hours schedule.
namestringoptional
The name of the office hours schedule.
time_zone_namestringoptional
The IANA time zone the schedule's hours are evaluated in.
time_intervalsarray<OfficeHoursTimeInterval>optional
The open intervals that make up the weekly schedule.
twenty_four_sevenbooleanoptional
Whether the schedule is open 24/7.
created_atintegeroptional
The time the schedule was created as a Unix timestamp.
updated_atintegeroptional
The time the schedule was last updated as a Unix timestamp.
401Returned when the request is unauthorized.

One documented failure

  • unauthorized

    Access Token Invalid

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the request fails validation, such as when required fields are missing or an interval's start or end minute is not on a 15-minute boundary.

One documented failure

  • data_invalid

    Invalid or duplicated record reference

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 401 is returned when the request is unauthorized. A 422 is returned when the request fails validation. name, time_zone_name, and time_intervals are required. Each interval's start_minute and end_minute must be on 15-minute boundaries.