Skip to content

Respond to a cover request

POST
/v1/rotations/{rotationId}/cover-requests/{requestId}/{responseAction}
curl --request POST \
--url https://api.roundrobinbot.eu/v1/rotations/example/cover-requests/example/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--header 'If-Match: example' \
--data '{ "operationId": "example", "expectedRevision": 1, "acknowledgedConflictIds": [ "example" ] }'

Requires a Slack member access token, the current expectedRevision and If-Match. Use an action offered by the request capability. Actions are accept, decline, cancel and end. Reuse operationId and the same body when retrying an uncertain result. A missing If-Match returns 428. On 412, refresh the preview before retrying.

rotationId
required
string
requestId
required
string
responseAction
required
string
/^(accept|decline|cancel|end)$/
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

Revision and conflict acknowledgments for a cover response.

object
operationId

Caller-generated mutation identity, at most 128 characters. Reuse only for an identical retry.

string
expectedRevision

Request revision the caller reviewed.

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

Exact current conflict identifiers acknowledged by the accepting recipient.

Array<string>
Examplegenerated
{
"operationId": "example",
"expectedRevision": 1,
"acknowledgedConflictIds": [
"example"
]
}

OK

Media typeapplication/json

Committed mutation result. DeliveryState describes publication progress, not confirmed Slack receipt.

object
operationId
required
string
rotationVersion
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
effectiveFrom
required
string format: date-time
request
required

A permitted cover request, its rotation name and caller-specific capabilities.

object
request
required

Requested interval, selected audience and current cover lifecycle state.

object
id
required
string
rotationId
required
string
cellId
required
string
requesterUserId
required
string
recipientUserIds
required
Array<string>
declinedUserIds
required
Array<string>
from
required
string format: date-time
to
required
string format: date-time
reason
required
string
revision
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
state
required
string
acceptedUserId
required
null | string
arrangementId
required
null | string
capability
required

Actions currently permitted for this caller. Mutations recheck these permissions.

object
canAccept
required
boolean
canDecline
required
boolean
canCancel
required
boolean
canEnd
required
boolean
reason
required
null | string
rotationName
required
string
arrangements
required
Array<object>

An interval assignment. Its recorded terms remain distinct from actual served history.

object
id
required

The arrangement identifier.

string
rotationId
required

The rotation identifier.

string
cellId
required

The rotation cell identifier.

string
userId
required

The assigned person’s Slack user identifier.

string
from
required

The inclusive UTC start.

string format: date-time
to
required

The exclusive UTC end.

string format: date-time
revision
required

The arrangement revision used when changing or ending it.

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

active or cancelled. An active record can describe an interval that has already ended.

string
kind
required

directAssignment, acceptedCover or swapLeg. Direct-assignment writes change or end only directAssignment.

string
origin
One of:
null
originalSnapshot
One of:
null
turnSelection
One of:
null
deliveryState
required
string
Examplegenerated
{
"operationId": "example",
"rotationVersion": 1,
"effectiveFrom": "2026-04-15T12:00:00Z",
"request": {
"request": {
"id": "example",
"rotationId": "example",
"cellId": "example",
"requesterUserId": "example",
"recipientUserIds": [
"example"
],
"declinedUserIds": [
"example"
],
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"reason": "example",
"revision": 1,
"state": "example",
"acceptedUserId": "example",
"arrangementId": "example"
},
"capability": {
"canAccept": true,
"canDecline": true,
"canCancel": true,
"canEnd": true,
"reason": "example"
},
"rotationName": "example"
},
"arrangements": [
{
"id": "example",
"rotationId": "example",
"cellId": "example",
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"revision": 1,
"state": "example",
"kind": "example",
"origin": {
"userIds": [
"example"
],
"complete": true
},
"originalSnapshot": {
"asOfUtc": "2026-04-15T12:00:00Z",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"complete": true,
"segments": [
{
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z",
"userIds": [
"example"
],
"resolved": true
}
]
},
"turnSelection": {
"kind": "example",
"from": "2026-04-15T12:00:00Z",
"to": "2026-04-15T12:00:00Z"
}
}
],
"deliveryState": "example"
}