Layers

Layers are the building blocks of a schedule. Each layer is an independent rotation with its own timezone, handoff schedule, restriction, and member list.

Create layer

POST /oncall/schedules/{schedule_id}/layers

namestringrequiredbody

Layer name (Primary, Secondary, Manager, etc.).

positionintegerbody

Stacking order. Lower = higher priority. Default = next available.

rotation_typestringrequiredbody

daily, weekly, or custom.

Required when rotation_type=custom. 1–60.

timezonestringrequiredbody

IANA timezone (e.g. America/New_York).

handoff_dayintegerbody

0–6 (Sunday–Saturday). Required for weekly.

handoff_hourintegerrequiredbody

0–23.

restriction_typestringbody

none, weekday_hours, weekends, or custom. Default none.

restriction_daysarraybody

Array of day numbers when restriction_type=custom.

0–23.

0–23. If less than start_hour, restriction wraps midnight (overnight shift).

membersarrayrequiredbody

Array of user IDs. Order is rotation order.

json
{ "name": "Primary", "rotation_type": "weekly", "timezone": "America/New_York", "handoff_day": 1, "handoff_hour": 9, "restriction_type": "weekday_hours", "restriction_start_hour": 9, "restriction_end_hour": 17, "members": ["usr_alice", "usr_bob"]}

Update layer

PATCH /oncall/layers/{id}

Any field above can be updated. Member reordering changes rotation position.

Delete layer

DELETE /oncall/layers/{id}

Cascades to members and fixed shifts on the layer. Overrides are not cascaded — they live on the schedule.

Reorder members

POST /oncall/layers/{id}/reorder

json
{ "member_ids": ["usr_carol", "usr_alice", "usr_bob"] }

Useful for "move someone to start of next rotation."

Ask a question... ⌘I