Edit a layer and keep its id. A layer that has started keeps its history: the current version ends now and the new one starts now, anchored so whoever the layer has on call stays on until the new rotation's next handoff. A layer that has not started is changed in place. The body is the create body; an absent `layer_number` keeps the layer's.
const url = 'https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layer/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', 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 PUT \ --url https://api.siteqwality.com/on_call_schedule/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/layer/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --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
Layer 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 updated; the id is unchanged
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 body, a participant not in this account, effective_from moved on a started layer, or effective_until not in the future
Missing or invalid authentication
Incident responder limit reached
Schedule or layer not found
The layer has ended, or another layer has this layer_number
Internal server error