Skip to content

Add a layer to an on-call schedule. The first participant covers from `effective_from` (or now) to the next handoff.

POST
/on_call_schedule/{schedule_id}/layer
curl --request POST \
--url https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "layer_number": 1, "rotation_type": "daily", "rotation_interval_days": 1, "handoff_time": "example", "handoff_day": 1, "participants": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "effective_from": "2026-04-15T12:00:00Z", "effective_until": "2026-04-15T12:00:00Z", "timezone": "example", "restrictions": [ { "type": "daily", "start_day_of_week": 1, "start_time": "example", "duration_minutes": 1 } ] }'
schedule_id
required
string format: uuid

On-call schedule identifier

Media type application/json
object
layer_number
integer | null format: int32
rotation_type
required
string
Allowed values: daily weekly custom
rotation_interval_days
integer | null format: int32
handoff_time
required
string
handoff_day

Weekly layers only: weekday of the handoff, 0 = Sunday .. 6 = Saturday, interpreted together with handoff_time in the schedule’s timezone. Ignored for daily and custom rotations.

integer | null format: int32
participants
required
Array<string>
effective_from
string | null format: date-time
effective_until
string | null format: date-time
timezone

An IANA zone for this layer’s handoffs and restrictions, for follow-the-sun layers. Absent: the schedule’s zone.

string | null
restrictions

Daily or weekly windows the layer covers, in its zone. Absent or empty: always.

Array<object>

A window a layer covers, repeated every day or every week in the layer’s zone. A window that runs past midnight (or past the end of the week) carries on into the next day.

object
type
required
string
Allowed values: daily weekly
start_day_of_week

Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.

integer | null format: int32
start_time
required

HH:MM, 24-hour local time.

string
duration_minutes
required

1 to 1440 for daily windows, 1 to 10080 for weekly ones.

integer format: int32

Layer created

Media type application/json
object
id
required
string format: uuid
schedule_id
required
string format: uuid
layer_number
required
integer format: int32
rotation_type
required
string
Allowed values: daily weekly custom
rotation_interval_days
integer | null format: int32
handoff_time
required
string
handoff_day

Weekly layers only: weekday of the handoff, 0 = Sunday .. 6 = Saturday, interpreted together with handoff_time in the schedule’s timezone.

integer | null format: int32
participants
required
Array<string>
effective_from
string | null format: date-time
effective_until
string | null format: date-time
created_at
required
string format: date-time
timezone

The layer’s own IANA zone for handoffs and restrictions; absent means the schedule’s.

string | null
restrictions
required

Windows the layer covers; empty means always.

Array<object>

A window a layer covers, repeated every day or every week in the layer’s zone. A window that runs past midnight (or past the end of the week) carries on into the next day.

object
type
required
string
Allowed values: daily weekly
start_day_of_week

Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.

integer | null format: int32
start_time
required

HH:MM, 24-hour local time.

string
duration_minutes
required

1 to 1440 for daily windows, 1 to 10080 for weekly ones.

integer format: int32
rotation_anchor
One of:

Where the rotation is counted from: absent on layers created before anchors were stored.

object
date
required

YYYY-MM-DD in the layer’s zone.

string
start_index
required
integer format: int32
version

The current version’s number (1 until the layer is edited). Set by the edit and versions routes.

integer | null format: int32
version_started_at

When the current version took over. Set by the edit and versions routes.

string | null format: date-time
Example
{
"rotation_type": "daily",
"restrictions": [
{
"type": "daily"
}
]
}

Invalid request body (time, interval, range, zone, restrictions, no participants), or a participant is not in this account

Missing or invalid authentication

Incident responder limit reached

On-call schedule not found

The schedule already has a layer with this layer_number

Internal server error