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

On-call Overrides

Temporarily hand an on-call shift to another user. Overrides are Layer documents; the id returned by the list endpoint is the Layer _id used to remove one.

Get all overrides

get
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
Query parameters
fromstringRequiredExample: 2026-03-13T09:41:00.000Z
tostringRequiredExample: 2026-03-13T09:41:00.000Z
Header parameters
x-api-keystringRequired

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

Responses
200

Overrides are Layer documents. id on each entry is the Layer _id you pass to the remove endpoint.

application/json
get/on-calls/{oncallId}/overrides
GET /on-calls/{oncallId}/overrides?from=text&to=text HTTP/1.1
Host: api.spike.sh
x-api-key: text
Accept: */*
{
  "overrides": [
    {
      "id": "64b7e2a1c3d4e5f60718293c",
      "start": "2026-03-20T00:00:00.000Z",
      "end": "2026-03-22T00:00:00.000Z",
      "desc": "Covering while Ada is on leave",
      "timezone": "America/New_York",
      "users": [
        "6a3c2d5e0f9b8c7d6e5f4a99"
      ],
      "shifts": [
        {
          "user": "6a3c2d5e0f9b8c7d6e5f4a99",
          "index": 0
        }
      ],
      "createdBy": "6a3c2d5e0f9b8c7d6e5f4a32",
      "createdAt": "2026-03-13T09:41:00.000Z",
      "index": 1
    }
  ],
  "pagination": {
    "perPage": 20,
    "currentPage": 1,
    "skip": 0,
    "total": 1,
    "totalPages": 1,
    "pages": [
      1
    ],
    "showingFrom": 0,
    "showingTill": 1
  }
}

Delete an override

delete
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
layerIdstringRequired

The override Layer _id — this is the id field returned by GET /on-calls/{oncallId}/overrides, NOT the on-call id.

Example: 64b7e2a1c3d4e5f60718293c
Header parameters
x-api-keystringRequired

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

Responses
200

Returns { done: true } — NOT { success: true }.

application/json
donebooleanOptional
delete/on-calls/{oncallId}/overrides/{layerId}/remove
DELETE /on-calls/{oncallId}/overrides/{layerId}/remove HTTP/1.1
Host: api.spike.sh
x-api-key: text
Accept: */*
{
  "done": true
}

Add an override

post

Add a temporary override to an on-call schedule. Overrides allow you to temporarily assign a different user to cover an on-call shift.

All timestamps should be in ISO 8601 format (e.g., 2025-01-24T00:00:00.000Z).

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.

Body

API callers send user, start and end. The legacy dashboard form fields (userId, startDate, endDate, startTime, endTime) are NOT the API contract. start/end as ISO 8601 are accepted from any caller (API key, OAuth or session).

userstringRequired

REQUIRED. The User _id to hand the shift to — an ObjectId, NOT an email address. A non-ObjectId is rejected with 400.

Example: 6a3c2d5e0f9b8c7d6e5f4a99
startstring · date-timeRequired

REQUIRED. ISO 8601 start of the override, interpreted in timezone.

Example: 2026-03-20T00:00:00.000Z
endstring · date-timeRequired

REQUIRED. ISO 8601 end of the override, interpreted in timezone.

Example: 2026-03-22T00:00:00.000Z
timezonestringOptional

Optional IANA timezone. Defaults to the calling user's timezone, then the org default.

Example: America/New_York
descstringOptional

Optional free-text note.

Example: Covering while Ada is on leave
Responses
200

Returns { done: true } — NOT { success: true }.

application/json
donebooleanOptional
post/on-calls/{oncallId}/overrides/add
POST /on-calls/{oncallId}/overrides/add HTTP/1.1
Host: api.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 173

{
  "user": "6a3c2d5e0f9b8c7d6e5f4a99",
  "start": "2026-03-20T00:00:00.000Z",
  "end": "2026-03-22T00:00:00.000Z",
  "timezone": "America/New_York",
  "desc": "Covering while Ada is on leave"
}
{
  "done": true
}

Last updated

Was this helpful?