Skip to content

Replace a rotation's grid

PUT
/v1/rotations/{rotationId}/coverage
curl --request PUT \
--url https://api.roundrobinbot.eu/v1/rotations/example/coverage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--header 'If-Match: example' \
--data '{ "lanes": [ { "id": "example", "name": "example" } ], "windows": [ { "id": "example", "name": "example", "timeZone": "example", "coverage": [ { "startDay": "example", "startTime": "example", "endDay": "example", "endTime": "example" } ], "cadence": { "type": "example", "timeZone": "example", "startsAt": "example", "period": 1, "skipWeekends": true, "skipNationalHolidays": true, "countryCodes": [ "example" ], "daysOfWeek": [ "example" ], "dayOfWeek": "example", "weeksInMonth": [ 1 ], "times": [ "example" ] } } ], "cells": [ { "id": "example", "laneId": "example", "windowId": "example", "rosterId": "example" } ], "doubleCover": true }'

Gives the rotation the lanes, coverage windows and cells you describe. A replacement, not a patch: the lanes you send are the lanes it will have, and one you leave out is deleted along with whoever was on duty in it. Answers with the whole rotation and a fresh ETag. Read the rotation first and send its lanes, windows and cells back with your change made. Leave windows out entirely to keep the columns it has, which is what an edit to the rows alone should do. To add a lane or a window, leave its id out, or give it a handle of your own for its cells to name. Places this leaves empty are dealt straight away rather than at the next hand-over, so a lane you add has somebody on it when the response comes back.

rotationId
required
string
If-Match
required
string

The ETag from your last read of this rotation, sent back exactly as you received it, quotes included. The write happens only if nothing changed in between: a stale validator is answered 412 and nothing is written. Send * to write against whatever is current on purpose. Omitting the header is 428, never an unconditional write. https://docs.roundrobinbot.eu/api/conventions/#conditional-writes

The grid PUT /v1/rotations/{rotationId}/coverage gives a rotation: its lanes, its coverage windows, and which list each place draws on.

object
lanes

The rows, in the order they should be dealt: the first lane is the primary one.

Array<object>

One row of the proposed grid.

object
id

The lane’s id, or a handle of your own for a lane you are adding. Always required.

null | string
name

What to call this lane, such as Primary or Frontend. Left out on a rotation with one lane, which never shows a name.

null | string
windows

The columns: when the rotation is covered, and how often duty changes hands there.

Array<object> | null

One column of the proposed grid.

object
id

The window’s id, or a handle of your own for a window you are adding. Always required.

null | string
name

What to call this window, such as EMEA.

null | string
timeZone

The time zone the covered hours below are read in, as a city identifier (Europe/Rome) or UTC. Fixed offsets are refused rather than guessed at.

null | string
coverage

The repeating week this column is open for. Leave it empty for a column that is open all week, which is what a rotation with no restricted hours has.

Array<object> | null

One stretch of the coverage week, which may run past midnight into the next day.

object
startDay

A weekday name, monday through sunday, lower case.

null | string
startTime

A time of day, HH:mm.

null | string
endDay
null | string
endTime
null | string
cadence
One of:
null
cells

Every lane crossed with every window, one cell each.

Array<object>

One place in the proposed grid: a lane crossed with a window.

object
id

The cell’s id, or left out to create one.

null | string
laneId

The lane this cell sits in, naming one of the lanes in this body.

null | string
windowId

The window this cell sits in, naming one of the windows in play.

null | string
rosterId

The list this place is dealt from, which is required on every cell.

null | string
doubleCover

Whether one person may hold two places at once when the list behind them is too short to fill both. Defaults to false, which leaves the places it cannot fill empty.

null | boolean
Examplegenerated
{
"lanes": [
{
"id": "example",
"name": "example"
}
],
"windows": [
{
"id": "example",
"name": "example",
"timeZone": "example",
"coverage": [
{
"startDay": "example",
"startTime": "example",
"endDay": "example",
"endTime": "example"
}
],
"cadence": {
"type": "example",
"timeZone": "example",
"startsAt": "example",
"period": 1,
"skipWeekends": true,
"skipNationalHolidays": true,
"countryCodes": [
"example"
],
"daysOfWeek": [
"example"
],
"dayOfWeek": "example",
"weeksInMonth": [
1
],
"times": [
"example"
]
}
}
],
"cells": [
{
"id": "example",
"laneId": "example",
"windowId": "example",
"rosterId": "example"
}
],
"doubleCover": true
}

OK

Media typeapplication/json

A rotation: the grid of duties it runs, who is in it, and who holds each place right now.

object
id
string
name
string
description
null | string
code

The short code the rotation answers to in Slack.

null | string
enabled
boolean
public

Whether every member of the workspace can see the rotation.

boolean
mode

manual, auto or external.

string
runningLanes

How many lanes are running, which is how many people hold the shift at once.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
isGrid

Whether this rotation has more than one place to be on duty at once.

boolean
doubleCover

Whether one person may hold two places at once when the list behind them is too short to fill both.

boolean
skipsAreOffTime

Whether days the cadence skips — weekends, national holidays — count as time the rotation is not covered. One switch for the whole rotation, read into every window’s own reading.

boolean
owners
Array<string>
channels
Array<string>
members

Everybody in the rotation: the union across every list it draws on.

object
users

Members added individually.

Array<object>

One member of a rotation.

object
userId
string
sequenceNumber

Where the member sits in the order the lists are built from.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
userGroups

Members that came in through a Slack user group, listed under the group they came from. Add or remove somebody in Slack’s group and the rotation follows.

Array<object>

A Slack user group in the rotation, and the people currently in it.

object
userGroupId
string
users
Array<object>

One member of a rotation.

object
userId
string
sequenceNumber

Where the member sits in the order the lists are built from.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
lanes

The rows of the grid: the kinds of duty this rotation runs.

Array<object>

A row of the grid: a kind of duty, such as primary or backend.

object
id
string
name

What the customer calls this lane, and absent until they name it.

null | string
windows

The columns of the grid: covered hours, a time zone, and a handover cadence.

Array<object>

A column of the grid: when the rotation is covered, and how often duty changes hands there.

object
id
string
name
null | string
timeZone

The one zone this window’s covered hours are expressed in, as its own identifier (Europe/Rome). Never rewritten to the tzdb canonical name a linked city shares. Empty on a manual rotation, which has no cadence and so no zone to express one in.

string
coverage

The repeating week this window is open for, as stored. Empty means the whole week.

Array<object>

One stretch of the coverage week, which may run past midnight into the next day.

object
startDay

A weekday name, monday through sunday.

string
startTime

A time of day, HH:mm.

string
endDay
string
endTime
string
alwaysOpen

Whether the window restricts nothing: open the whole week, every week.

boolean
cadence

How often duty changes hands in this column.

object
type

One of dayOfWeek, daysOfWeekList, dayOfMonth, nthWeekdayOfMonth, daily, workday, manual or external. Fields that mean nothing for the type are absent rather than defaulted, so test for presence rather than for a zero.

string
timeZone

The time zone the cadence was configured with, as its own identifier (Europe/Rome). Never rewritten to the tzdb canonical name a linked city shares.

string
startsAt

When the cadence starts, in its own time zone.

string format: date-time
period

How many units of the cadence’s own kind sit between two hand-overs.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
skipWeekends
boolean
skipNationalHolidays
boolean
countryCodes

The countries whose weekends and holidays the skips are read from.

Array<string>
nextEvents

The next hand-overs this window has already scheduled. For anything further out, ask for a window from GET /v1/rotations/{rotationId}/schedule.

Array<string>
dayOfWeek

Set for dayOfWeek and nthWeekdayOfMonth.

null | string
daysOfWeek

Set for daysOfWeekList.

Array<string> | null
dayOfMonth

Set for dayOfMonth.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
weeksInMonth

Set for nthWeekdayOfMonth: which occurrences in the month, 1 through 5.

Array<integer | string> | null
times

Set for daily: the times of day it hands over at.

Array<string> | null
partner

Set for external: which partner drives the rotation. One of pagerDuty, opsGenie, jsm for Jira Service Management, or none when the rotation is external but no partner is linked yet.

null | string
openNow

Whether the window is open at the moment of the response.

boolean
currentCoverage
One of:
null
nextCoverage
One of:
null
cells

Every lane crossed with every window, and whoever holds each one.

Array<object>

A lane crossed with a window: one place somebody can be on duty.

object
id
string
laneId
string
windowId
string
rosterId

Which list this place is dealt from, matching an entry in the rotation’s rosters.

null | string
stopped

Whether this place is defined but not running, because the workspace is not on a paid plan.

boolean
holder
One of:
null
rosters

The lists this rotation deals from, each in the order this rotation deals it.

Array<object>

A list this rotation deals from, in the order this rotation deals it.

object
rosterId

The list this order belongs to. Absent on a rotation whose people are not on a shared list yet.

null | string
order

The turn order: who is dealt, and in what order.

Array<object>

One position in a turn order.

object
userId
string
userGroupId

Set when the member is in the order by way of a user group.

null | string
turn
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
nextTurn

The turn the next handover deals from.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
onDutyUserGroupId

The Slack user group kept in sync with whoever is on call.

null | string
onCall

The on-call resource, embedded, so the common question needs no second call.

object
rotationId
string
onCall

Empty when nobody holds the shift, and also when an external rotation’s on-duty person has no Slack identity: read unmappedExternalDuty before concluding “nobody”.

Array<object>

One person holding the shift, and when they hold it until.

object
userId

The Slack user id of the person actually on duty.

string
turn

Their position in the turn order of the list they were dealt from.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
cellId

Which place in the grid they hold, and the lane and window that cross there.

null | string
laneId
null | string
laneName
null | string
windowId
null | string
windowName
null | string
since
null | string format: date-time
until
null | string format: date-time
skippedForAbsence

Members the plan would otherwise have named, who were passed over because they were absent.

Array<object>

A member the rotation passed over because they were away.

object
userId

The Slack user id of the member who was passed over.

string
from
null | string format: date-time
until
null | string format: date-time
source

Where the absence came from: googleCalendar or internalAvailability. Null on older records, which predate the field, so treat it as optional.

null | string
unmappedExternalDuty
One of:
null
users

Every Slack user this body names, resolved, when the caller asked for ?expand=users. Null otherwise, so a client can tell “not asked for” from “asked for and nobody matched”.

Array<object> | null

A Slack user, as Round Robin knows them.

object
id

The Slack user id.

string
teamId

The workspace that owns this person’s directory entry, which under Enterprise Grid can differ from the calling key’s workspace.

string
displayName
null | string
realName
null | string
email

Null when the install was never granted users:read.email, not only when unknown.

null | string
isGuest
boolean
isExternal

A Slack Connect person: visible through a shared channel, never a member of the workspace.

boolean
isDeleted

Deactivated in Slack, or gone from the workspace. These people are still answered rather than hidden, so an id a rotation still names resolves to something you can render.

boolean
avatarUrl

The person’s Slack avatar, at 192px.

null | string
timeZone

The person’s Slack time zone, as an IANA identifier (Europe/Rome). Absent when Round Robin has not seen one for them.

null | string
createdAt
string format: date-time
updatedAt
string format: date-time
Examplegenerated
{
"id": "example",
"name": "example",
"description": "example",
"code": "example",
"enabled": true,
"public": true,
"mode": "example",
"runningLanes": 1,
"isGrid": true,
"doubleCover": true,
"skipsAreOffTime": true,
"owners": [
"example"
],
"channels": [
"example"
],
"members": {
"users": [
{
"userId": "example",
"sequenceNumber": 1
}
],
"userGroups": [
{
"userGroupId": "example",
"users": [
{
"userId": "example",
"sequenceNumber": 1
}
]
}
]
},
"lanes": [
{
"id": "example",
"name": "example"
}
],
"windows": [
{
"id": "example",
"name": "example",
"timeZone": "example",
"coverage": [
{
"startDay": "example",
"startTime": "example",
"endDay": "example",
"endTime": "example"
}
],
"alwaysOpen": true,
"cadence": {
"type": "example",
"timeZone": "example",
"startsAt": "2026-04-15T12:00:00Z",
"period": 1,
"skipWeekends": true,
"skipNationalHolidays": true,
"countryCodes": [
"example"
],
"nextEvents": [
"2026-04-15T12:00:00Z"
],
"dayOfWeek": "example",
"daysOfWeek": [
"example"
],
"dayOfMonth": 1,
"weeksInMonth": [
1
],
"times": [
"example"
],
"partner": "example"
},
"openNow": true,
"currentCoverage": {
"startUtc": "2026-04-15T12:00:00Z",
"endUtc": "2026-04-15T12:00:00Z"
},
"nextCoverage": {
"startUtc": "2026-04-15T12:00:00Z",
"endUtc": "2026-04-15T12:00:00Z"
}
}
],
"cells": [
{
"id": "example",
"laneId": "example",
"windowId": "example",
"rosterId": "example",
"stopped": true,
"holder": {
"userId": "example",
"externalUser": {
"email": "example",
"name": "example"
},
"turn": 1,
"waiting": true,
"since": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"skippedForAbsence": [
{
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"source": "example"
}
]
}
}
],
"rosters": [
{
"rosterId": "example",
"order": [
{
"userId": "example",
"userGroupId": "example",
"turn": 1
}
],
"nextTurn": 1
}
],
"onDutyUserGroupId": "example",
"onCall": {
"rotationId": "example",
"onCall": [
{
"userId": "example",
"turn": 1,
"cellId": "example",
"laneId": "example",
"laneName": "example",
"windowId": "example",
"windowName": "example",
"since": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"skippedForAbsence": [
{
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"source": "example"
}
]
}
],
"unmappedExternalDuty": {
"email": "example",
"name": "example",
"until": "2026-04-15T12:00:00Z"
},
"users": [
{
"id": "example",
"teamId": "example",
"displayName": "example",
"realName": "example",
"email": "example",
"isGuest": true,
"isExternal": true,
"isDeleted": true,
"avatarUrl": "example",
"timeZone": "example"
}
]
},
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}

Bad Request

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unauthorized

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Payment Required

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Conflict

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Precondition Failed

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Precondition Required

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}