For the complete documentation index, see llms.txt. This page is also available as Markdown.

On-call

Create, read and update on-call schedules, layers and shifts.

Fetch on-calls

get

Get list of on-call schedules for a team

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

Header parameters
x-api-keystringRequired

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

x-team-idstringRequired

The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

An envelope of { oncalls, oncallReportsFeatureFlag } — NOT a bare array.

application/json
oncallReportsFeatureFlagbooleanOptional

Whether this organisation's plan includes on-call report downloads.

get/on-calls
GET /on-calls HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Accept: */*
{
  "oncalls": [
    {
      "_id": "64b7e2a1c3d4e5f60718293a",
      "name": "Engineering primary rotation",
      "timezone": "America/New_York",
      "teams": [
        "5f2b1c4d9e8a7b6c5d4e3f21"
      ],
      "users": [
        {
          "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
          "firstName": "Ada",
          "lastName": "Lovelace",
          "email": "ada@acme.io",
          "phone": "+15550100",
          "role": "admin",
          "timezone": "America/New_York"
        }
      ],
      "shifts": [
        {
          "_id": "64b7e2a1c3d4e5f60718293d",
          "oncall": "64b7e2a1c3d4e5f60718293a",
          "index": 0,
          "layerIndex": 0,
          "layer": "64b7e2a1c3d4e5f60718293b",
          "org": "5f72e289b17d1656e0115098",
          "active": true,
          "start": "2026-03-09T10:00:00.000Z",
          "end": "2026-03-16T10:00:00.000Z",
          "user": {
            "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
            "firstName": "Ada",
            "lastName": "Lovelace",
            "email": "ada@acme.io",
            "phone": "+15550100",
            "role": "admin",
            "timezone": "America/New_York"
          },
          "isGap": false
        }
      ],
      "active": true,
      "createdAt": "2026-03-13T09:41:00.000Z"
    }
  ],
  "oncallReportsFeatureFlag": true
}

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" }
          ]
        }
Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

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
201

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

application/json
successbooleanOptional
post/on-calls
POST /on-calls HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Content-Type: application/json
Accept: */*
Content-Length: 143

{
  "name": "Backend on-call",
  "users": [
    "<user-id-1>",
    "<user-id-2>"
  ],
  "rotation": {
    "length": 1,
    "unit": "weeks",
    "handoff": "10:00",
    "handoffDay": "monday"
  }
}
{
  "success": true,
  "data": {
    "id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "layers": [
      {
        "id": "64b7e2a1c3d4e5f60718293b",
        "index": 0,
        "rotation": {
          "length": 1,
          "unit": "weeks",
          "handoff": "10:00",
          "handoffDay": "monday"
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a32"
        ],
        "customTimings": null
      }
    ],
    "createdAt": "2026-03-13T09:41:00.000Z",
    "updatedAt": "2026-03-13T09:41:00.000Z"
  }
}

Fetch an on-call

get

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

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

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

The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

API-key callers get { oncall }. A missing or non-owned schedule still answers 200 with {"oncall": {}} rather than 404 — treat an empty object as not-found. An {oncallId} that is not a valid ObjectId answers 400 with an empty body.

application/json
get/on-calls/{oncallId}
GET /on-calls/{oncallId}?from=text HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Accept: */*
{
  "oncall": {
    "_id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "users": [
      {
        "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "email": "ada@acme.io",
        "phone": "+15550100",
        "role": "admin",
        "timezone": "America/New_York"
      }
    ],
    "activeShift": {
      "_id": "64b7e2a1c3d4e5f60718293d",
      "oncall": "64b7e2a1c3d4e5f60718293a",
      "index": 0,
      "layerIndex": 0,
      "layer": "64b7e2a1c3d4e5f60718293b",
      "org": "5f72e289b17d1656e0115098",
      "active": true,
      "start": "2026-03-09T10:00:00.000Z",
      "end": "2026-03-16T10:00:00.000Z",
      "user": {
        "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "email": "ada@acme.io",
        "phone": "+15550100",
        "role": "admin",
        "timezone": "America/New_York"
      },
      "isGap": false
    },
    "renderedShifts": []
  }
}

Edit an on-call

put

Update an on-call's top-level properties (name, team and/or timezone). Layers are not changed here — use the layer endpoints to edit rotations. Send only the fields you want to change. Changing the timezone reinterprets every stored layer wall-clock time (handoffs, custom timing windows) in the new zone — the digits stay, their meaning moves.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

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).

timezonestringOptional

New IANA schedule timezone (e.g. America/New_York). All layer handoff times and custom timing windows are interpreted in it.

Responses
200

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

application/json
successbooleanOptional
put/on-calls/{oncallId}
PUT /on-calls/{oncallId} HTTP/1.1
Host: api.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "name": "Backend on-call (EU)"
}
{
  "success": true,
  "data": {
    "id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation (v2)",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "layers": [
      {
        "id": "64b7e2a1c3d4e5f60718293b",
        "index": 0,
        "rotation": {
          "length": 1,
          "unit": "weeks",
          "handoff": "10:00",
          "handoffDay": "monday"
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a32"
        ],
        "customTimings": null
      }
    ],
    "createdAt": "2026-03-13T09:41:00.000Z",
    "updatedAt": "2026-03-13T09:41:00.000Z"
  }
}

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" }
          ]
        }
Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

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
201

Layer added; the full on-call is returned

application/json
successbooleanOptional
post/on-calls/{oncallId}/layers
POST /on-calls/{oncallId}/layers HTTP/1.1
Host: api.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "users": [
    "<user-id-2>",
    "<user-id-1>"
  ],
  "rotation": {
    "length": 1,
    "unit": "weeks",
    "handoffDay": "monday"
  }
}
{
  "success": true,
  "data": {
    "id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "layers": [
      {
        "id": "64b7e2a1c3d4e5f60718293b",
        "index": 0,
        "rotation": {
          "length": 1,
          "unit": "weeks",
          "handoff": "10:00",
          "handoffDay": "monday"
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a32"
        ],
        "customTimings": null
      },
      {
        "id": "64b7e2a1c3d4e5f607182940",
        "index": 1,
        "rotation": {
          "length": 1,
          "unit": "days",
          "handoff": "09:00",
          "handoffDay": null
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a99"
        ],
        "customTimings": null
      }
    ],
    "createdAt": "2026-03-13T09:41:00.000Z",
    "updatedAt": "2026-03-13T09:41:00.000Z"
  }
}

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" }
          ]
        }
Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

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
successbooleanOptional
put/on-calls/{oncallId}/layers/{layerId}
PUT /on-calls/{oncallId}/layers/{layerId} HTTP/1.1
Host: api.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 39

{
  "users": [
    "<user-id-1>",
    "<user-id-2>"
  ]
}
{
  "success": true,
  "data": {
    "id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "layers": [
      {
        "id": "64b7e2a1c3d4e5f60718293b",
        "index": 0,
        "rotation": {
          "length": 1,
          "unit": "weeks",
          "handoff": "10:00",
          "handoffDay": "monday"
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a32"
        ],
        "customTimings": null
      }
    ],
    "createdAt": "2026-03-13T09:41:00.000Z",
    "updatedAt": "2026-03-13T09:41:00.000Z"
  }
}

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.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

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
successbooleanOptional
delete/on-calls/{oncallId}/layers/{layerId}
DELETE /on-calls/{oncallId}/layers/{layerId} HTTP/1.1
Host: api.spike.sh
x-api-key: text
Accept: */*
{
  "success": true,
  "data": {
    "id": "64b7e2a1c3d4e5f60718293a",
    "name": "Engineering primary rotation",
    "timezone": "America/New_York",
    "teams": [
      "5f2b1c4d9e8a7b6c5d4e3f21"
    ],
    "layers": [
      {
        "id": "64b7e2a1c3d4e5f60718293b",
        "index": 0,
        "rotation": {
          "length": 1,
          "unit": "weeks",
          "handoff": "10:00",
          "handoffDay": "monday"
        },
        "users": [
          "6a3c2d5e0f9b8c7d6e5f4a32"
        ],
        "customTimings": null
      }
    ],
    "createdAt": "2026-03-13T09:41:00.000Z",
    "updatedAt": "2026-03-13T09:41:00.000Z"
  }
}

Who is on-call next

get

Returns the next scheduled shift for an on-call, looking up to 7 days ahead of now (or of the schedule's scheduledStart, whichever is later). Returns an empty object {} when the on-call has no future shift in that window or the on-call does not exist. Responds 400 with an empty body when oncallId is not a valid ObjectId.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
oncallIdstringRequired

The on-call schedule's _id (24-char hex ObjectId).

Example: 64b7e2a1c3d4e5f60718293a
Header parameters
x-api-keystringRequired

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

x-team-idstringOptional

Optional. The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

The next shift, or {} when there is none.

application/json
get/on-calls/{oncallId}/who-is-on-call-next
GET /on-calls/{oncallId}/who-is-on-call-next HTTP/1.1
Host: api.spike.sh
x-api-key: text
Accept: */*
{
  "nextShift": {
    "userId": "6a3c2d5e0f9b8c7d6e5f4a32",
    "startTimeInUTC": "2026-03-16T10:00:00.000Z",
    "endTimeInUTC": "2026-03-23T10:00:00.000Z"
  }
}

Fetch the active shift

get

Returns the shift that is currently active for an on-call schedule. activeShift is null when nobody is on-call right now.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
oncallIdstringRequired

The on-call schedule's _id (24-char hex ObjectId).

Example: 64b7e2a1c3d4e5f60718293a
Header parameters
x-api-keystringRequired

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

x-team-idstringOptional

Optional. The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

Successful response

application/json
get/on-calls/{oncallId}/active-shift
GET /on-calls/{oncallId}/active-shift HTTP/1.1
Host: api.spike.sh
x-api-key: text
Accept: */*
{
  "activeShift": {
    "_id": "64b7e2a1c3d4e5f60718293d",
    "oncall": "64b7e2a1c3d4e5f60718293a",
    "user": {
      "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@acme.io"
    },
    "start": "2026-03-09T10:00:00.000Z",
    "end": "2026-03-16T10:00:00.000Z",
    "active": true
  }
}

Is a user on-call?

get

Check whether a personal is currently oncall or not

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

Query parameters
idstringRequired
Header parameters
x-api-keystringRequired

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

x-team-idstringRequired

The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

Requires the ?id=<userId> query parameter. Returns {} when the user id is unknown to the caller's organisation.

application/json
isCurrentlyOncallbooleanOptional
activeShiftobject · nullableOptional
shiftEndsstringOptional

A DISPLAY string formatted with moment llll in the user's timezone (e.g. Mon, Mar 16, 2026 10:00 AM) — not an ISO 8601 timestamp.

partOfMultipleOncallsbooleanOptional
get/on-calls/am-i-on-call
GET /on-calls/am-i-on-call?id=text HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Accept: */*
{
  "isCurrentlyOncall": true,
  "activeShift": {
    "_id": "64b7e2a1c3d4e5f60718293d",
    "oncall": "64b7e2a1c3d4e5f60718293a",
    "index": 0,
    "layerIndex": 0,
    "layer": "64b7e2a1c3d4e5f60718293b",
    "org": "5f72e289b17d1656e0115098",
    "active": true,
    "start": "2026-03-09T10:00:00.000Z",
    "end": "2026-03-16T10:00:00.000Z",
    "user": {
      "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@acme.io",
      "phone": "+15550100",
      "role": "admin",
      "timezone": "America/New_York"
    },
    "isGap": false
  },
  "shiftEnds": "Mon, Mar 16, 2026 10:00 AM",
  "partOfMultipleOncalls": true,
  "activeOncallShifts": [
    {
      "_id": "64b7e2a1c3d4e5f60718293d",
      "oncall": "64b7e2a1c3d4e5f60718293a",
      "index": 0,
      "layerIndex": 0,
      "layer": "64b7e2a1c3d4e5f60718293b",
      "org": "5f72e289b17d1656e0115098",
      "active": true,
      "start": "2026-03-09T10:00:00.000Z",
      "end": "2026-03-16T10:00:00.000Z",
      "user": {
        "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
        "firstName": "Ada",
        "lastName": "Lovelace",
        "email": "ada@acme.io",
        "phone": "+15550100",
        "role": "admin",
        "timezone": "America/New_York"
      },
      "isGap": false
    }
  ]
}

Fetch upcoming shifts from multiple schedules

get

Fetch upcoming shifts from multiple schedules

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

Query parameters
idstringRequired
Header parameters
x-api-keystringRequired

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

x-team-idstringRequired

The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

Requires the ?id=<userId> query parameter. Returns the user's shifts from the start of the current week to one month ahead.

application/json
spectrumobject[]Optional
handoffobjectOptional
get/on-calls/upcoming-shifts
GET /on-calls/upcoming-shifts?id=text HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Accept: */*
{
  "spectrum": [
    {
      "userId": "6a3c2d5e0f9b8c7d6e5f4a32",
      "startTimeInUTC": "2026-03-16T10:00:00.000Z",
      "endTimeInUTC": "2026-03-23T10:00:00.000Z",
      "oncall": "64b7e2a1c3d4e5f60718293a"
    }
  ],
  "handoff": {
    "hours": 10,
    "minutes": 0
  }
}

Fetch all currently active on-call shifts

get

Get a list of users who are currently on call

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

x-team-idstringRequired

The target team's _id — a 24-character hex ObjectId such as 5f2b1c4d9e8a7b6c5d4e3f21. This is NOT the short uid slug (e.g. eng) shown in dashboard URLs; passing the uid will not resolve a team. Read the _id from GET /teams/get-all-teams or GET /teams/get-my-teams.

REQUIRED for: GET /on-calls (API-key callers get 400 without it), POST /on-calls, and every team-scoped read that declares it — the /incidents/* and /services/* listings, /escalations, /automation/rules and the integration endpoints.

OPTIONAL for: the incident action endpoints (acknowledge, resolve, escalate, unacknowledge), which derive the organisation from the API key itself; PUT /on-calls/{oncallId} and the on-call layer endpoints, which fall back to the organisation's default team; and org-wide reads such as GET /orgs/info and GET /users, which ignore it.

When supplied it must name a team inside the API key's organisation. A team from another organisation is rejected with 403.

Header parameters
x-api-keystringRequired

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

x-team-idstringRequired

The team's _id — a 24-character hex ObjectId, NOT the short uid slug. Read it from GET /teams/get-all-teams.

Example: 5f2b1c4d9e8a7b6c5d4e3f21
Responses
200

A bare JSON array of every currently-active shift in the organisation — not wrapped in an envelope.

application/json
_idstringOptional
oncallstringOptional
indexnumberOptional
layerIndexnumberOptional
layerstringOptional
orgstringOptional
activebooleanOptional
startstring · date-timeOptional
endstring · date-timeOptional
isGapbooleanOptional
get/on-calls/all-active-on-call-shifts
GET /on-calls/all-active-on-call-shifts HTTP/1.1
Host: api.spike.sh
x-api-key: text
x-team-id: text
Accept: */*
[
  {
    "_id": "64b7e2a1c3d4e5f60718293d",
    "oncall": "64b7e2a1c3d4e5f60718293a",
    "index": 0,
    "layerIndex": 0,
    "layer": "64b7e2a1c3d4e5f60718293b",
    "org": "5f72e289b17d1656e0115098",
    "active": true,
    "start": "2026-03-09T10:00:00.000Z",
    "end": "2026-03-16T10:00:00.000Z",
    "user": {
      "_id": "6a3c2d5e0f9b8c7d6e5f4a32",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@acme.io",
      "phone": "+15550100",
      "role": "admin",
      "timezone": "America/New_York"
    },
    "isGap": false
  }
]

Last updated

Was this helpful?