Skip to main content
Reading requires alerts.calendars.read; creating, changing, deleting, and reading a file require alerts.calendars.manage. See Holiday calendars for how weekly hours count by them.

Create or change a calendar

POST creates a calendar and PUT replaces one. The response is the calendar, with its id, org_id, created_by, created_at, and updated_at.
A calendar is used by putting its id in the calendar of weekly hours: {"calendar_id": "<id>", "holidays": "exclude"} leaves the days off out, and "holidays": "only" applies the hours on days off only. Weekly hours take it in the support hours of escalation policies, the time conditions of routing rules and notify policies, rotations of on-call schedules, alert pipelines, and weekly silence windows. Saving any of them with a calendar that is not in the organization fails with 400.

Read an ICS file

POST /parse takes {"content": "<the .ics text>"}, up to 2 MiB, and returns {"days": [...]} without saving anything: every all-day event becomes a day, an event of several days becomes each of its days, and a name that contains 补班 or 上班, or ends with 班, becomes a workday.

See what uses a calendar

GET /{id}/references lists what counts by the calendar, as {"kind", "id", "name"}; kind is routing_rule, escalation_policy, schedule, mute_rule, notify_policy, or alert_pipeline. DELETE fails with 409 while the list is not empty. Errors
Last modified on October 31, 2026