Skip to content

Mark somebody away

POST
/v1/rotations/{rotationId}/availability
curl --request POST \
--url https://api.roundrobinbot.eu/v1/rotations/example/availability \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '{ "userId": "example", "from": "2026-04-15T12:00:00Z", "until": "2026-04-15T12:00:00Z", "reason": "example", "appliesTo": "example" }'

Records that a member of this rotation cannot take a shift between from and until. Answers 201 with the absence and its Location. Sending the same absence again answers 200 with the absence that already exists, and creates nothing, so a nightly sync of next month’s leave is safe to run as often as you like. Two requests are the same absence when they name the same person, the same period and the same appliesTo. No Idempotency-Key is needed for that reason. The person must already be a member of the rotation: this says when somebody cannot take a shift, never who is in the rotation. Somebody this workspace has never heard of answers 404, and somebody it knows who is not in this rotation answers 400.

rotationId
required
string

Marks somebody away, so the next hand-over passes over them.

object
userId

The Slack user id of the person who is away. Required.

null | string
from

When the absence starts, as an RFC 3339 timestamp. Required.

null | string format: date-time
until

When the absence ends, as an RFC 3339 timestamp. Required, and later than from.

null | string format: date-time
reason

Why, in your own words, or leave it out. Shown next to the absence and never acted on.

null | string
appliesTo

What the absence covers: rotation, the default, for this rotation only, or allRotations for every rotation in the workspace.

null | string
Examplegenerated
{
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"reason": "example",
"appliesTo": "example"
}

OK

Media typeapplication/json

A period a member of a rotation cannot take a shift.

object
id

The absence’s id, which is what the delete takes.

string
userId

The Slack user id of the person who is away.

string
from

When the absence starts, in UTC.

string format: date-time
until

When the absence ends, in UTC.

string format: date-time
reason

Whatever was recorded about why, or null. Free text, and never used for anything but display.

null | string
appliesTo

What the absence covers: rotation for one rotation, allRotations for every rotation in the workspace.

string
rotationIds

The rotations it covers when appliesTo is rotation, and empty otherwise.

Array<string>
recurring

Whether this absence repeats. A repeating absence can only be set in the dashboard, so anything the public API created answers false.

boolean
source

Where the absence came from. Always internalAvailability: these are the absences Round Robin stores and this API can delete, spelled the same way as the source on skippedForAbsence, so an absence and the skip it caused read as one vocabulary. An out-of-office event mirrored from a connected calendar is not one of these and is not returned here.

string
Examplegenerated
{
"id": "example",
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"reason": "example",
"appliesTo": "example",
"rotationIds": [
"example"
],
"recurring": true,
"source": "example"
}

Created

Media typeapplication/json

A period a member of a rotation cannot take a shift.

object
id

The absence’s id, which is what the delete takes.

string
userId

The Slack user id of the person who is away.

string
from

When the absence starts, in UTC.

string format: date-time
until

When the absence ends, in UTC.

string format: date-time
reason

Whatever was recorded about why, or null. Free text, and never used for anything but display.

null | string
appliesTo

What the absence covers: rotation for one rotation, allRotations for every rotation in the workspace.

string
rotationIds

The rotations it covers when appliesTo is rotation, and empty otherwise.

Array<string>
recurring

Whether this absence repeats. A repeating absence can only be set in the dashboard, so anything the public API created answers false.

boolean
source

Where the absence came from. Always internalAvailability: these are the absences Round Robin stores and this API can delete, spelled the same way as the source on skippedForAbsence, so an absence and the skip it caused read as one vocabulary. An out-of-office event mirrored from a connected calendar is not one of these and is not returned here.

string
Examplegenerated
{
"id": "example",
"userId": "example",
"from": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"reason": "example",
"appliesTo": "example",
"rotationIds": [
"example"
],
"recurring": true,
"source": "example"
}

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"
}

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"
}