|docs
Start Trial

Create a schedule

Important note: Shift-based schedules use the V3 API and are not compatible with V2 automations. To create automations for Shift-Based Schedules, you need to:

  1. Update your automations to use the V3 API for all new shift-based schedules
  2. Keep the V2 endpoint for your existing schedules

An upgrade tool for existing schedules is coming soon; your legacy schedules will keep working in the meantime. Learn more.

Create a new on-call schedule with basic metadata. Rotations and events must be added via separate API calls after creation.

Rejected fields: rotations and escalation_policies are not accepted in the request body and will result in a 400 error.

Authorization<token>

The API Key with format Token token=<API_KEY>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

Create a rotation POST

<!-- theme: info --> > **Important note:** Shift-based schedules use the V3 API and are not compatible with V2 automations. **To create automations for Shift-Based Schedules, you need to:** > > 1. **Update your automations** to use the V3 API for all new shift-based schedules > 2. **Keep the V2 endpoint** for your existing schedules > > An upgrade tool for existing schedules is coming soon; your legacy schedules will keep working in the meantime. [Learn more](https://support.pagerduty.com/main/docs/shift-based-schedules-api-upgrade-examples). Create a new empty rotation for a schedule. After creating a rotation, add events to define the on-call pattern. **Note:** Rotations have no configuration of their own — all scheduling logic (recurrence, assignment strategy, members) is specified on events. The request body must be empty or `{}`.

Delete a custom shift DELETE

<!-- theme: info --> > **Important note:** Shift-based schedules use the V3 API and are not compatible with V2 automations. **To create automations for Shift-Based Schedules, you need to:** > > 1. **Update your automations** to use the V3 API for all new shift-based schedules > 2. **Keep the V2 endpoint** for your existing schedules > > An upgrade tool for existing schedules is coming soon; your legacy schedules will keep working in the meantime. [Learn more](https://support.pagerduty.com/main/docs/shift-based-schedules-api-upgrade-examples). Delete a custom shift by ID. When the shift is not started, it deletes the shift entirely. If the shift is already started, it sets the end_time to now. It returns Bad Request when shift is already ended.