v1

latestOpenAPI 3.0.22026-07-144652931.4 MB
Schedules_v3

Create an event

<!-- 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.

Create a new event that defines when and how users are on-call within a rotation.

Constraints:

  • Maximum 5 events per rotation
  • Events within a rotation cannot overlap
  • effective_since must be in the future (past values are clamped to now)
  • All users referenced in assignment_strategy.members must exist and belong to the account
post/v3/schedules/{id}/rotations/{rotation_id}/events

Path parameters

idstring required

The ID of the schedule.

rotation_idstring required

The ID of the rotation.

Request body

Example request

{
  "event": {
    "start_time": {
      "date_time": "2025-03-03T09:00:00Z",
      "time_zone": "America/New_York"
    },
    "end_time": {
      "date_time": "2025-03-03T09:00:00Z",
      "time_zone": "America/New_York"
    },
    "assignment_strategy": {
      "shifts_per_member": 1,
      "members": [
        {
          "user_id": "PUSER123"
        }
      ]
    }
  }
}

Response

Event created successfully

Example response

{
  "event": {
    "id": "ABCDEFGHIJKLMNOPQRSTUVWXY2",
    "name": "Weekly On-Call",
    "start_time": {
      "date_time": "2025-03-03T09:00:00Z",
      "time_zone": "America/New_York"
    },
    "end_time": {
      "date_time": "2025-03-03T09:00:00Z",
      "time_zone": "America/New_York"
    },
    "effective_since": "2025-03-03T00:00:00Z",
    "effective_until": "2025-09-01T00:00:00Z",
    "recurrence": [
      "RRULE:FREQ=WEEKLY"
    ],
    "assignment_strategy": {
      "shifts_per_member": 1,
      "members": [
        {
          "user_id": "PUSER123"
        }
      ]
    }
  }
}