Add a layer to an on-call schedule. The first participant covers from `effective_from` (or now) to the next handoff.
const url = 'https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layer';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 } ] }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”On-call schedule identifier
Request Body required
Section titled “Request Body required ”object
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.
An IANA zone for this layer’s handoffs and restrictions, for follow-the-sun layers. Absent: the schedule’s zone.
Daily or weekly windows the layer covers, in its zone. Absent or empty: always.
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
Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.
HH:MM, 24-hour local time.
1 to 1440 for daily windows, 1 to 10080 for weekly ones.
Responses
Section titled “ Responses ”Layer created
object
Weekly layers only: weekday of the handoff, 0 = Sunday .. 6 = Saturday,
interpreted together with handoff_time in the schedule’s timezone.
The layer’s own IANA zone for handoffs and restrictions; absent means the schedule’s.
Windows the layer covers; empty means always.
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
Weekly only: the weekday the window opens, 0 = Sunday .. 6 = Saturday.
HH:MM, 24-hour local time.
1 to 1440 for daily windows, 1 to 10080 for weekly ones.
The current version’s number (1 until the layer is edited). Set by the edit and versions routes.
When the current version took over. Set by the edit and versions routes.
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