Skip to content

Set who is on duty

PUT
/v1/rotations/{rotationId}/on-call
curl --request PUT \
--url https://api.roundrobinbot.eu/v1/rotations/example/on-call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--header 'If-Match: example' \
--data '{ "userIds": [ "example" ] }'

Puts the people you name on duty, replacing whoever holds the shift now. They must be members of the rotation, and userIds must name at least one: an empty list is refused rather than read as “take everybody off duty”. Answers with the new on-duty state and a fresh ETag. Naming the people who already hold the lanes they would take changes nobody’s duty. When they were already put there by name, nothing is written and the same ETag comes back.

rotationId
required
string
If-Match
required
string

The ETag from your last read of this resource, 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 body of PUT /v1/rotations/{rotationId}/on-call: who should be on duty.

object
userIds

The Slack user ids to put on duty. At least one, and each must be a member of the rotation.

Array<string>
Examplegenerated
{
"userIds": [
"example"
]
}

OK

Media typeapplication/json

Current on-duty assignments for a rotation. Responses with externalAssignments have no ETag; read the assignment freshness and coverage fields on each response.

object
externalAssignments
One of:
null
rotationId

Rotation ID.

string
nobodyOnCallReason

Why nobody is on duty: nobody-on-call-unplanned when a running lane in an open window has nobody in it, nobody-on-call-as-arranged when every running lane is shut by its hours. The two spellings the duty history uses. Absent while any lane is live, even if another lane has no one: an empty onCall with no reason here is a person with no Slack identity, so read externalAssignments or unmappedExternalDuty. Lanes a downgrade stopped count for neither.

null | string
onCall

Current mapped Slack assignments. An empty list does not establish a coverage gap: check externalAssignments or unmappedExternalDuty.

Array<object>

One current mapped Slack assignment. A user can appear more than once when they hold multiple assignments.

object
userId

Slack user ID of the person on duty.

string
turn

Position in the native turn order. External assignments have no native turn order.

integer format: int32
cellId

Identifier of the lane in a window holding this assignment.

null | string
laneId

The lane. Lanes for external assignments do not identify provider roles.

null | string
laneName

Lane name, when available.

null | string
windowId

The window. External assignment windows do not define provider recurrence.

null | string
windowName

Window name, when available.

null | string
since

Assignment start in UTC, when known.

null | string format: date-time
coveredUntil

Exclusive end in UTC of this stretch of cover: the window closing, or the turn ending if that comes first. Null while nothing bounds the stretch.

null | string format: date-time
turnEnds

When this person’s turn ends in UTC: the next hand-over of the lane in its window, which can be later than coveredUntil when the window closes first. Null where nothing hands it over.

null | string format: date-time
skippedForAbsence

Members skipped for absence when this assignment began.

Array<object>

A member skipped because of an absence at assignment time.

object
userId

Slack user ID of the skipped member.

string
from

Absence start in UTC, when known.

null | string format: date-time
until

Absence end in UTC, when known.

null | string format: date-time
source

Absence source: googleCalendar or internalAvailability. Null when the source is unknown.

null | string
nextOnCall

Who takes each lane next, one entry per running lane in each window of a native rotation, earliest start first, ties in window order and then lane order. A lane whose window is shut lists the person who comes back when it opens (comingBack); otherwise the person its next hand-over deals. Absences are not resolved, since the scheduler skips somebody who is away only when it deals. For a window nothing fires on, the entry is what a rotate of the whole rotation does: a lane nobody on its list is free to take has no entry and is listed in seatsWithNobodyFree. Empty for a randomised rotation, which draws at the hand-over, for a switched-off rotation, and for a provider-owned one (read externalAssignments).

Array<object> | null

The person who takes one lane in a window next, and when.

object
userId

Slack user ID of the person who takes the lane.

string
turn

Their position in the native turn order.

integer format: int32
cellId

Identifier of the lane in a window the person takes.

string
laneId

The lane.

string
laneName

Lane name, when available.

null | string
windowId

The window.

string
windowName

Window name, when available.

null | string
since

When the person takes the lane in UTC: the window’s next hand-over, or the moment it opens where the same person is coming back. Null where the window has no computed firing (a manual one).

null | string format: date-time
turnEnds

When their turn ends in UTC, where the window has a hand-over after that.

null | string format: date-time
comingBack

Whether this is the lane’s holder resuming when a shut window opens, rather than a new person being dealt. Read since as a hand-over only where this is false.

boolean
seatsWithNobodyFree

The lanes in a window that a rotate leaves as they are, because nobody on their list is free: everyone on the list either holds this lane or stays on duty in a lane the rotate does not change. Such a lane has no entry in nextOnCall. Listed only for a window nothing fires on, which is handed over by a rotate; empty for a window that hands over on a schedule, for a randomised rotation, for a switched-off rotation, and for a provider-owned one.

Array<object> | null

A lane in a window that a rotate leaves as it is, because nobody on its list is free to take it.

object
cellId

Identifier of the lane in a window, the same cellId the on-call entries carry.

string
laneId

The lane.

string
laneName

Lane name, when available.

null | string
windowId

The window.

string
windowName

Window name, when available.

null | string
unmappedExternalDuty
One of:
null
users

Directory records for current mapped Slack users and skipped members when ?expand=users is requested. Null otherwise. Expansion disables ETag validation.

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. A person nothing in the workspace names any more (no rotation, role, partner schedule mapping, or open cover, swap or arrangement) is removed 30 days after they left. Their id then answers 404 on this endpoint, on the availability of a person and on a person’s shifts.

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
Examplegenerated
{
"externalAssignments": {
"asOfUtc": "2026-04-15T12:00:00Z",
"state": "example",
"noAnswerReason": "example",
"coverage": "example",
"lastSuccessfulReadUtc": "2026-04-15T12:00:00Z",
"lastReadFailureUtc": "2026-04-15T12:00:00Z",
"knownFromUtc": "2026-04-15T12:00:00Z",
"knownUntilUtc": "2026-04-15T12:00:00Z",
"current": [
{
"localAssignmentId": "example",
"cellId": "example",
"user": "example",
"externalName": "example",
"externalEmail": "example",
"sinceUtc": "2026-04-15T12:00:00Z",
"untilUtc": "2026-04-15T12:00:00Z",
"externalAssignment": {
"memberKind": "example",
"participantId": "example",
"sourceType": "example",
"rotationId": "example",
"shiftId": "example",
"overrideId": "example",
"originalStartUtc": "2026-04-15T12:00:00Z",
"originalEndUtc": "2026-04-15T12:00:00Z"
}
}
],
"requiredAssignmentCount": 1,
"assignedAssignmentCount": 1,
"lastReadFailure": "example",
"distinctResponderCount": 1,
"distinctParticipantCount": 1,
"unmappedAssignmentCount": 1,
"emptyAssignmentCount": 1,
"nextChange": {
"atUtc": "2026-04-15T12:00:00Z",
"starting": [
{
"localAssignmentId": "example",
"cellId": "example",
"user": "example",
"externalName": "example",
"externalEmail": "example",
"sinceUtc": "2026-04-15T12:00:00Z",
"untilUtc": "2026-04-15T12:00:00Z",
"externalAssignment": {
"memberKind": "example",
"participantId": "example",
"sourceType": "example",
"rotationId": "example",
"shiftId": "example",
"overrideId": "example",
"originalStartUtc": "2026-04-15T12:00:00Z",
"originalEndUtc": "2026-04-15T12:00:00Z"
}
}
],
"continuing": [
{
"localAssignmentId": "example",
"cellId": "example",
"user": "example",
"externalName": "example",
"externalEmail": "example",
"sinceUtc": "2026-04-15T12:00:00Z",
"untilUtc": "2026-04-15T12:00:00Z",
"externalAssignment": {
"memberKind": "example",
"participantId": "example",
"sourceType": "example",
"rotationId": "example",
"shiftId": "example",
"overrideId": "example",
"originalStartUtc": "2026-04-15T12:00:00Z",
"originalEndUtc": "2026-04-15T12:00:00Z"
}
}
],
"ending": [
{
"localAssignmentId": "example",
"cellId": "example",
"user": "example",
"externalName": "example",
"externalEmail": "example",
"sinceUtc": "2026-04-15T12:00:00Z",
"untilUtc": "2026-04-15T12:00:00Z",
"externalAssignment": {
"memberKind": "example",
"participantId": "example",
"sourceType": "example",
"rotationId": "example",
"shiftId": "example",
"overrideId": "example",
"originalStartUtc": "2026-04-15T12:00:00Z",
"originalEndUtc": "2026-04-15T12:00:00Z"
}
}
]
}
},
"rotationId": "example",
"nobodyOnCallReason": "example",
"onCall": [
{
"userId": "example",
"turn": 1,
"cellId": "example",
"laneId": "example",
"laneName": "example",
"windowId": "example",
"windowName": "example",
"since": "2026-04-15T12:00:00Z",
"coveredUntil": "2026-04-15T12:00:00Z",
"turnEnds": "2026-04-15T12:00:00Z",
"skippedForAbsence": [
{
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"source": "example"
}
]
}
],
"nextOnCall": [
{
"userId": "example",
"turn": 1,
"cellId": "example",
"laneId": "example",
"laneName": "example",
"windowId": "example",
"windowName": "example",
"since": "2026-04-15T12:00:00Z",
"turnEnds": "2026-04-15T12:00:00Z",
"comingBack": true
}
],
"seatsWithNobodyFree": [
{
"cellId": "example",
"laneId": "example",
"laneName": "example",
"windowId": "example",
"windowName": "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"
}
]
}

Bad Request

Media typeapplication/json
object
type
null | string
title
null | string
status
null | integer format: int32
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 format: int32
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 format: int32
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 format: int32
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 format: int32
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 format: int32
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 format: int32
detail
null | string
instance
null | string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}