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 is unavailable between from and until. Returns 201 with the absence and a Location header. The absence affects only overlapping duty periods. Sending the same person, period and appliesTo again returns 200 with the existing absence. The reason does not affect this match. No Idempotency-Key is required. The absence can change current duty. Read GET /v1/rotations/{rotationId}/on-call to check who is serving; a successful create does not confirm that a duty change has completed. Time already served is unchanged. The person must be a member of the rotation. An unknown workspace user returns 404; a known user who is not a member returns 400. Add the member before creating their absence.

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