On-call

Fetch on-calls

get

Get list of on-call schedules for a team

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

x-team-idstringRequired

Team ID of the team you are making the request to.

Responses
200

Successful response

application/json
objectOptional
get
/on-calls

Create an on-call

post

Create an on-call schedule.

Common case: send users plus a top-level rotation. Spike creates one primary layer and derives the shift order from the order of users.

Advanced: send a layers array instead to create multiple escalation tiers in one call.

The x-team-id header is REQUIRED and sets which team the on-call belongs to.


Custom slots (optional): restrict when this layer is on-call.

  • customiseFor: "day" with fromTime/toTime for a single daily window.

  • customiseFor: "week" with a conditions array to pick specific days (one entry per day window — add as many as you need).

Times are HH:mm (24-hour) in the schedule timezone; days are lowercase names.

        {
          "customiseFor": "week",
          "conditions": [
            { "fromDayOfWeek": "monday",    "fromTime": "00:00", "toDayOfWeek": "tuesday",   "toTime": "00:00" },
            { "fromDayOfWeek": "tuesday",   "fromTime": "00:00", "toDayOfWeek": "wednesday", "toTime": "00:00" },
            { "fromDayOfWeek": "wednesday", "fromTime": "00:00", "toDayOfWeek": "thursday",  "toTime": "00:00" }
          ]
        }
Header parameters
x-api-keystringRequired

Your API key. Find it in the Spike dashboard under Settings → API.

x-team-idstringRequired

REQUIRED to create an on-call — the id of the team the on-call will belong to. Must be a team in your organisation.

Body

Provide top-level users + rotation (one primary layer) OR a layers array (takes precedence when present).

namestringRequired

Display name for the on-call.

usersstring[] · min: 1Optional

Rotation members for the primary layer, in rotation order.

timezonestringOptional

IANA timezone for handoff times (e.g. America/New_York). Defaults to the owner timezone or Etc/UTC.

descstringOptional

Optional description.

Responses
post
/on-calls

Fetch an on-call

get

Get details about a specific on-call including layers, shifts and users

Path parameters
oncallIdstringRequired

oncallId parameter

Query parameters
fromstringRequiredExample: 2025-01-24T00:00:00.000Z
Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

x-team-idstringRequired

Team ID of the team you are making the request to.

Responses
200

Successful response

application/json
objectOptional
get
/on-calls/{oncallId}

Edit an on-call

put

Update an on-call's top-level properties (name and/or team). Layers are not changed here — use the layer endpoints to edit rotations. Send only the fields you want to change.

Path parameters
oncallIdstringRequired

The on-call ObjectId.

Header parameters
x-api-keystringRequired

Your API key. Find it in the Spike dashboard under Settings → API.

x-team-idstringOptional

Optional. Team to scope the request to. Defaults to your organisation's default team when omitted.

Body
namestringOptional

New display name.

teamIdstringOptional

Move the on-call to this team (ObjectId).

Responses
200

On-call updated; the full on-call is returned

application/json
objectOptional
put
/on-calls/{oncallId}

Add a layer

post

Add a new layer (rotation) to an on-call.

It's appended after the existing layers as the next escalation tier; shifts are derived from the order of users. Returns the full updated on-call.


Custom timings (optional): restrict when this layer is on-call.

  • customiseFor: "day" with fromTime/toTime for a single daily window.

  • customiseFor: "week" with a conditions array to pick specific days (one entry per day window — add as many as you need).

Times are HH:mm (24-hour) in the schedule timezone; days are lowercase names.

        {
          "customiseFor": "week",
          "conditions": [
            { "fromDayOfWeek": "monday",    "fromTime": "00:00", "toDayOfWeek": "tuesday",   "toTime": "00:00" },
            { "fromDayOfWeek": "tuesday",   "fromTime": "00:00", "toDayOfWeek": "wednesday", "toTime": "00:00" },
            { "fromDayOfWeek": "wednesday", "fromTime": "00:00", "toDayOfWeek": "thursday",  "toTime": "00:00" }
          ]
        }
Path parameters
oncallIdstringRequired

The on-call ObjectId.

Header parameters
x-api-keystringRequired

Your API key. Find it in the Spike dashboard under Settings → API.

x-team-idstringOptional

Optional. Team to scope the request to. Defaults to your organisation's default team when omitted.

Body
usersstring[] · min: 1Required

Rotation members for this layer, in order.

descstringOptional

Optional layer description.

Responses
post
/on-calls/{oncallId}/layers

Edit a layer

put

Send any subset of users, rotation, desc; omitted fields keep their current values. When you send rotation, its fields merge onto the current cadence (e.g. send only { "rotation": { "length": 2 } } to change just the length). Returns the full updated on-call.


Custom slots (optional): restrict when this layer is on-call.

  • customiseFor: "day" with fromTime/toTime for a single daily window.

  • customiseFor: "week" with a conditions array to pick specific days (one entry per day window — add as many as you need).

Times are HH:mm (24-hour) in the schedule timezone; days are lowercase names.

        {
          "customiseFor": "week",
          "conditions": [
            { "fromDayOfWeek": "monday",    "fromTime": "00:00", "toDayOfWeek": "tuesday",   "toTime": "00:00" },
            { "fromDayOfWeek": "tuesday",   "fromTime": "00:00", "toDayOfWeek": "wednesday", "toTime": "00:00" },
            { "fromDayOfWeek": "wednesday", "fromTime": "00:00", "toDayOfWeek": "thursday",  "toTime": "00:00" }
          ]
        }
Path parameters
oncallIdstringRequired

The on-call ObjectId.

layerIdstringRequired

The layer ObjectId (from layers[].id).

Header parameters
x-api-keystringRequired

Your API key. Find it in the Spike dashboard under Settings → API.

x-team-idstringOptional

Optional. Team to scope the request to. Defaults to your organisation's default team when omitted.

Body
usersstring[] · min: 1Optional

Replacement rotation members, in order (replaces the existing list).

descstringOptional

New layer description.

Responses
200

Layer updated; the full on-call is returned

application/json
objectOptional
put
/on-calls/{oncallId}/layers/{layerId}

Delete a layer

delete

Delete a layer from an on-call. An on-call must always keep at least one layer, so deleting the last remaining layer returns 409. Returns the full updated on-call.

Path parameters
oncallIdstringRequired

The on-call ObjectId.

layerIdstringRequired

The layer ObjectId (from layers[].id).

Header parameters
x-api-keystringRequired

Your API key. Find it in the Spike dashboard under Settings → API.

x-team-idstringOptional

Optional. Team to scope the request to. Defaults to your organisation's default team when omitted.

Responses
200

Layer deleted; the full on-call is returned

application/json
objectOptional
delete
/on-calls/{oncallId}/layers/{layerId}

Is a user on-call?

get

Check whether a personal is currently oncall or not

Query parameters
idstringRequired
Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

x-team-idstringRequired

Team ID of the team you are making the request to.

Responses
200

Successful response

application/json
objectOptional
get
/oncalls/am-i-on-call

Fetch upcoming shifts from multiple schedules

get

Fetch upcoming shifts from multiple schedules

Query parameters
idstringRequired
Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

x-team-idstringRequired

Team ID of the team you are making the request to.

Responses
200

Successful response

application/json
objectOptional
get
/oncalls/upcoming-shifts

Fetch all currently active on-call shifts

get

Get a list of users who are currently on call

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

x-team-idstringRequired

Team ID of the team you are making the request to.

Responses
200

Successful response

application/json
objectOptional
get
/oncalls/all-active-on-call-shifts

Last updated