Quick start
- In the app, an owner opens Organization → Integrations → API keys and creates a key. It is shown once: copy it.
- Export it with the API address:
export TEAMPAGER_API=https://api.teampager.io/v1
export TEAMPAGER_API_KEY=tpk_…
- Ask who is on call:
curl "$TEAMPAGER_API/on-call" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
The examples below use shell variables for ids ($BOARD_ID, $PERSON_ID, $ALERT_ID…). Read them from the lists: GET /v1/boards, GET /v1/people, GET /v1/alerts.
Authentication
Send the key on every request: Authorization: Bearer tpk_…. A key belongs to the organization, not to the person who created it. What it changes is signed with its name in Activity (“terraform (API key)”).
Keep keys on servers and in secret stores, never in a web page. Roll a key to replace it without downtime (the old one works for 24 hours), or revoke it at once if it leaked.
Access
| Access | What the key can do |
| Read | Every GET: on call, boards, chains, people and their channels, time off, pages, heartbeats. Changes nothing. |
| Respond to pages | Read, plus acknowledge, resolve and reopen pages. For an assistant or agent that handles pages. |
| Read and write | Everything: page someone, boards and rotas, escalation chains, time off and coverage, people, channels, mutes, heartbeats. |
A key can't touch billing, company sign-in (SSO), directory sync (SCIM), alert secrets, Slack, or other API keys; it can't remove people, invite anyone, change roles or delete boards. Phone numbers come back masked (+1 ••• ••• 0344), and a heartbeat's ping URL is shown once, when the key creates it.
Limits
60 requests a minute per key and 120 for the whole organization; a write counts as two. Over that, the answer is 429 rate_limited with Retry-After in seconds. Every answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.
Up to 10 active keys per organization. These limits are the same on every plan. Plan limits — people on rotas, boards, pages a month, heartbeats — apply exactly as in the app, and the error says which one was hit.
Retries
Send Idempotency-Key: <any unique string> on a POST. Sending the same request again within 24 hours returns the first answer, marked Idempotent-Replayed: true, instead of doing it twice: a retried page never wakes anyone twice. The same key with a different body is 422 idempotency_key_reused. PUT, PATCH and DELETE are safe to repeat as they are.
Errors
{
"error": {
"code": "insufficient_scope",
"message": "This API key can't do that. …",
"requestId": "…",
"details": {"required": "write"}
}
}
Branch on code; the message is for people. Each endpoint lists its own codes.
| Status | Code | Meaning |
400 | invalid_json, unknown_fields, invalid_… | The body or a parameter is wrong. details names the field when it can. |
401 | unauthorized | The key is missing, mistyped, revoked or expired. |
403 | insufficient_scope | The key's access is too narrow for this operation. details.required says which access it needs. |
403 | quota_members, quota_schedules, quota_alerts | A plan limit. details has limit and used. |
404 | not_found | Nothing with that id in your organization. |
409 | already_muted, already_resolved, not_acked, … | The action doesn't fit the current state. |
409 / 422 | idempotency_in_flight, idempotency_key_reused | An Idempotency-Key is still running, or was used with another body. |
429 | rate_limited | Too many requests. Wait Retry-After seconds. |
500 / 503 | internal_error | Something went wrong on our side. Retry in a moment; if it lasts, send requestId to support. |
On call
Who has the pager.
GET /v1/on-call
Who is on call right now on every board, and who is next. The quickest answer to "who do I call?": one entry per board, one line per rota.
Access: Read — any key
Response 200
Who is on call on every board. Returns {"data": [ … ]}, a list of OnCall.
curl "$TEAMPAGER_API/on-call" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized429 rate_limited
GET /v1/boards/{id}/on-call
Who is on call on this board right now, until when, and who is next.
Access: Read — any key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Response 200
Who is on call on this board. Returns OnCall.
curl "$TEAMPAGER_API/boards/$BOARD_ID/on-call" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
Pages
Pages (alerts): list, acknowledge, resolve, reopen, or page someone.
GET /v1/alerts
List pages, newest first. Without status, returns the pages that still need someone (open and acked).
Access: Read — any key
Parameters
| Field | Type | Description |
status | query, string | active (default: open and acked), all, or a comma-separated list of open, acked, resolved. |
limit | query, integer 1–100 | 1 to 100, default 50. |
cursor | query, string | nextCursor from the previous response. |
Response 200
Pages, newest first. Returns AlertList.
curl "$TEAMPAGER_API/alerts?status=all&limit=5" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
400 invalid_status, invalid_cursor401 unauthorized429 rate_limited
GET /v1/alerts/{id}
One page and its state.
Access: Read — any key
Parameters
| Field | Type | Description |
id required | path, string | Page id. |
Response 200
The page. Returns Alert.
curl "$TEAMPAGER_API/alerts/$ALERT_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
POST /v1/alerts/{id}/ack
Acknowledge a page: escalation stops. Signed with the key's name; the page shows "Acked through the API." Acknowledging twice is not an error.
Access: Respond to pages · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Page id. |
Response 200
The page, acknowledged. Returns Alert.
curl -X POST "$TEAMPAGER_API/alerts/$ALERT_ID/ack" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
400 invalid_json, unknown_fields401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight, already_resolved422 idempotency_key_reused429 rate_limited
POST /v1/alerts/{id}/resolve
Resolve a page: it is over.
Access: Respond to pages · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Page id. |
Response 200
The page, resolved. Returns Alert.
curl -X POST "$TEAMPAGER_API/alerts/$ALERT_ID/resolve" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
400 invalid_json, unknown_fields401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
POST /v1/alerts/{id}/reopen
Undo an acknowledgement: the page is open again. Only an acknowledged page can be reopened. Escalation picks up at the next step, timed from now; people already paged aren't paged again.
Access: Respond to pages · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Page id. |
Response 200
The page, open again. Returns Alert.
curl -X POST "$TEAMPAGER_API/alerts/$ALERT_ID/reopen" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
400 invalid_json, unknown_fields401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight, not_acked, already_resolved422 idempotency_key_reused429 rate_limited
POST /v1/pages
Page whoever is on call on a board now, like Page now in the app. Counts toward the monthly page quota. Send an Idempotency-Key so a retry never pages twice.
Access: Read and write · Accepts Idempotency-Key
Body
| Field | Type | Description |
title required | string | What's wrong, as the person on call will read it. 1–500 characters. |
boardId required | string | The board whose on-call person is paged. |
Response 202
Accepted: the page goes out within seconds. Returns PageAccepted.
curl -X POST "$TEAMPAGER_API/pages" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Idempotency-Key: disk-full-db-1" \
-H "Content-Type: application/json" \
-d @- <<EOF
{"title":"Disk full on db-1","boardId":"$BOARD_ID"}
EOF
Errors
400 invalid_json, unknown_fields, summary_required, summary_too_long, invalid_schedule_id, unknown_schedule401 unauthorized403 insufficient_scope, quota_alerts409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
Boards
Boards (on-call schedules), their rotas, coverage and escalation chains.
GET /v1/boards
List the boards (schedules) with their rotas and who is on call now.
Access: Read — any key
Response 200
Every board. Returns {"data": [ … ]}, a list of Board.
curl "$TEAMPAGER_API/boards" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized429 rate_limited
POST /v1/boards
Create a board with its first rota (members are person ids, in order).
Access: Read and write · Accepts Idempotency-Key
Body
| Field | Type | Description |
name required | string | 1–200 characters. |
timezone | string | IANA time zone. Default: the organization's. |
members required | string[] | People who take turns, in order. At least one. |
handover | object | |
handover.weekday | integer 0–6 | 0 = Monday … 6 = Sunday. |
handover.time | string | HH:MM, local. |
slotUnit | "week" | "day" | "hours_12" | "hours_8" | Default week. |
Response 201
The new board. Returns BoardDetail.
curl -X POST "$TEAMPAGER_API/boards" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{"name":"Platform","timezone":"America/Toronto","members":["$PERSON_ID"],"handover":{"weekday":0,"time":"09:00"},"slotUnit":"week"}
EOF
Errors
400 invalid_json, unknown_fields, invalid_name, invalid_members, invalid_handover, invalid_timezone, invalid_slot_unit, invalid_handover_weekday, invalid_handover_time401 unauthorized403 insufficient_scope, quota_schedules, quota_members409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
GET /v1/boards/{id}
One board: rotas, absences and the upcoming slots (forecast). Use a slot's startsAt to change who covers it.
Access: Read — any key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Response 200
The board. Returns BoardDetail.
curl "$TEAMPAGER_API/boards/$BOARD_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
PATCH /v1/boards/{id}
Rename, pause or resume a board, or change a rota's members, timezone, handover or slot length. Send only what changes. members, handover and slotUnit apply to rotaId (default: the first rota). Slots already planned keep their person; use coverage to change one slot.
Access: Read and write
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Body
| Field | Type | Description |
name | string | 1–200 characters. |
timezone | string | |
members | string[] | Replaces the rota's members, in order. |
handover | object | |
handover.weekday | integer 0–6 | |
handover.time | string | |
slotUnit | "week" | "day" | "hours_12" | "hours_8" | |
paused | boolean | true pauses the board: it pages nobody. |
rotaId | string | |
Response 200
The board, updated. Returns BoardDetail.
curl -X PATCH "$TEAMPAGER_API/boards/$BOARD_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Platform on call"}'
Errors
400 invalid_json, unknown_fields, empty_patch, invalid_members, empty_rota, band_not_found401 unauthorized403 insufficient_scope, quota_members404 not_found429 rate_limited
GET /v1/boards/{id}/chain
The escalation chain of each rota on this board: who is paged next if nobody acknowledges.
Access: Read — any key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Response 200
The escalation chain of each rota. Returns Chain.
curl "$TEAMPAGER_API/boards/$BOARD_ID/chain" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
PUT /v1/boards/{id}/chain
Replace the escalation chain of one rota. Step 1 is always whoever is on call; send the steps after it (0 to 3). Escalation stops after the last one. An empty or unreachable step stops the chain: it never jumps ahead.
Access: Read and write
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Body
| Field | Type | Description |
rotaId | string | Default: the first rota. |
steps required | object[] | 0 to 3 steps, in order. |
steps[].targetKind required | "next_on_rota" | "person" | "everyone_else" | "one_by_one" | |
steps[].personId | string | Required for person, refused otherwise. |
steps[].waitMinutes | 2 | 5 | 10 | 15 | 30 or null | Null = the board's default. |
Response 200
The chain, as stored. Returns Chain.
curl -X PUT "$TEAMPAGER_API/boards/$BOARD_ID/chain" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"steps":[{"targetKind":"next_on_rota","waitMinutes":5},{"targetKind":"everyone_else","waitMinutes":10}]}'
Errors
400 invalid_json, unknown_fields, invalid_steps, chain_too_long, invalid_target_kind, invalid_target_person, invalid_wait_minutes, duplicate_target, unknown_person, band_not_found401 unauthorized403 insufficient_scope404 not_found429 rate_limited
POST /v1/boards/{id}/coverage
Change who covers a slot: cover, swap, skip or move. Refused if the person is away. cover: personId takes slotStart. skip: the slot becomes a hole. swap / move: exchange slotStart with otherSlotStart. Slot times come from upcoming in GET /v1/boards/{id}.
Access: Read and write · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Body
| Field | Type | Description |
kind required | "cover" | "swap" | "skip" | "move" | |
slotStart required | date-time | startsAt of the slot to change. |
otherSlotStart | date-time | For swap and move. |
personId | string | For cover. |
rotaId | string | Default: the first rota. |
Response 200
The board, with the change. Returns BoardDetail.
curl -X POST "$TEAMPAGER_API/boards/$BOARD_ID/coverage" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{"kind":"cover","slotStart":"$SLOT_START","personId":"$PERSON_ID"}
EOF
Errors
400 invalid_json, unknown_fields, invalid_kind, slot_required, slot_not_in_window, slot_in_past, slot_b_required, cover_user_required, both_slots_gaps401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight, cover_user_away422 idempotency_key_reused429 rate_limited
Time off
Absences: the person's slots become holes, nothing slides.
GET /v1/absences
Absences that apply to every board. Absences on a single board are in GET /v1/boards/{id}.
Access: Read — any key
Response 200
Organization-wide absences. Returns {"data": [ … ]}, a list of OrgAbsence.
curl "$TEAMPAGER_API/absences" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized429 rate_limited
POST /v1/boards/{id}/absences
Mark someone away on this board between two dates. Their slots become holes; nothing slides.
Access: Read and write · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
Body
| Field | Type | Description |
personId required | string | |
startDate required | date | First day away, YYYY-MM-DD, in the board's time zone. |
endDate required | date | Last day away, inclusive. At most 26 weeks after the start. |
Response 201
The board, with the absence. Returns BoardDetail.
curl -X POST "$TEAMPAGER_API/boards/$BOARD_ID/absences" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<EOF
{"personId":"$PERSON_ID","startDate":"2027-01-04","endDate":"2027-01-08"}
EOF
Errors
400 invalid_json, unknown_fields, invalid_person_id, invalid_dates401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
POST /v1/boards/{id}/absences/{absenceId}/cancel
Cancel an absence on this board.
Access: Read and write · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
id required | path, string | Board id. |
absenceId required | path, string | Absence id (from GET /v1/boards/{id}). |
Response 200
The board, without the absence. Returns BoardDetail.
curl -X POST "$TEAMPAGER_API/boards/$BOARD_ID/absences/$ABSENCE_ID/cancel" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
400 invalid_json, unknown_fields401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
People
The directory, how we reach each person, and mutes.
GET /v1/people
List the people in the organization.
Access: Read — any key
Parameters
| Field | Type | Description |
includeRemoved | query, "true" | "false" | true to include people who left. |
Response 200
The directory. Returns {"data": [ … ]}, a list of Person.
curl "$TEAMPAGER_API/people" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized429 rate_limited
POST /v1/people
Add a person to the directory. They can go on rotas and be paged. Nobody is invited, no email is sent, and they get no login. email and mobile become their first channels.
Access: Read and write · Accepts Idempotency-Key
Body
| Field | Type | Description |
name required | string | 1–120 characters. |
email | string | Becomes their first email channel. |
mobile | string | E.164, e.g. +14165550123. Becomes an unverified SMS channel. |
Response 201
The new person. Returns Person.
curl -X POST "$TEAMPAGER_API/people" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Sam Rivera","email":"sam@example.com"}'
Errors
400 invalid_json, unknown_fields, invalid_display_name401 unauthorized403 insufficient_scope409 idempotency_in_flight422 idempotency_key_reused429 rate_limited
GET /v1/people/{personId}
One person and how we reach them (phone numbers are masked).
Access: Read — any key
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Response 200
The person and their channels. Returns PersonDetail.
curl "$TEAMPAGER_API/people/$PERSON_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
PATCH /v1/people/{personId}
Rename a person.
Access: Read and write
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Body
| Field | Type | Description |
name required | string | 1–120 characters. |
Response 200
The person, renamed. Returns Person.
curl -X PATCH "$TEAMPAGER_API/people/$PERSON_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Sam Rivera-Ortiz"}'
Errors
400 invalid_json, unknown_fields, invalid_name, invalid_display_name401 unauthorized403 insufficient_scope404 not_found429 rate_limited
GET /v1/people/{personId}/channels
How we reach this person, in order (phone numbers are masked).
Access: Read — any key
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Response 200
Their channels. Returns {"data": [ … ]}, a list of Channel.
curl "$TEAMPAGER_API/people/$PERSON_ID/channels" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
POST /v1/people/{personId}/channels
Add an email, SMS or voice channel. A phone stays unverified until the person enters the code in the app. SMS is coming soon: texts don't page anyone yet; voice calls do.
Access: Read and write · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Body
| Field | Type | Description |
kind required | "email" | "sms" | "voice" | |
address required | string | Email address, or phone number in E.164. |
rung | 1 | 2 | 3 | Default: 1 for email, 2 for SMS, 3 for voice. |
ttsLocale | "en-US" | "fr-FR" | Voice only: the language the call speaks. Default en-US. |
Response 201
The channel. A phone is unverified until the person enters the code in the app. Returns Channel.
curl -X POST "$TEAMPAGER_API/people/$PERSON_ID/channels" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"voice","address":"+14165550123"}'
Errors
400 invalid_json, unknown_fields, invalid_kind, invalid_address, invalid_tts_locale401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight, channel_exists422 idempotency_key_reused429 rate_limited
POST /v1/people/{personId}/mute
Mute a person for a while, or until someone unmutes them. A muted person's steps are skipped right away and the page goes to the next step. Give one of minutes, endsAt or until: "unmute".
Access: Read and write · Accepts Idempotency-Key
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Body
| Field | Type | Description |
minutes | integer 1–43200 | |
endsAt | date-time | Within 30 days. |
until | "unmute" | No end: muted until someone unmutes. Shows a banner to the whole organization. |
reason | string | up to 200 characters. |
Response 201
The mute. Returns MuteState.
curl -X POST "$TEAMPAGER_API/people/$PERSON_ID/mute" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"minutes":60,"reason":"On a flight"}'
Errors
400 invalid_json, unknown_fields, mute_end_required, invalid_mute_end, invalid_reason401 unauthorized403 insufficient_scope404 not_found409 idempotency_in_flight, already_muted422 idempotency_key_reused429 rate_limited
PATCH /v1/people/{personId}/mute
Change when a mute ends. minutes extends from the current end; endsAt sets a new end; until: "unmute" removes the end.
Access: Read and write
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Body
| Field | Type | Description |
minutes | integer 1–43200 | |
endsAt | date-time | |
until | "unmute" | |
Response 200
The mute, with its new end. Returns MuteState.
curl -X PATCH "$TEAMPAGER_API/people/$PERSON_ID/mute" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"minutes":30}'
Errors
400 invalid_json, unknown_fields, mute_end_required, invalid_mute_end401 unauthorized403 insufficient_scope404 not_found, not_muted429 rate_limited
DELETE /v1/people/{personId}/mute
Unmute a person. Unmuting someone who isn't muted is not an error.
Access: Read and write
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
Response 204
Unmuted. No body.
curl -X DELETE "$TEAMPAGER_API/people/$PERSON_ID/mute" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized403 insufficient_scope404 not_found429 rate_limited
DELETE /v1/people/{personId}/channels/{channelId}
Remove a channel.
Access: Read and write
Parameters
| Field | Type | Description |
personId required | path, string | Person id (from GET /v1/people). |
channelId required | path, string | Channel id. |
Response 204
Removed. No body.
curl -X DELETE "$TEAMPAGER_API/people/$PERSON_ID/channels/$CHANNEL_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized403 insufficient_scope404 not_found429 rate_limited
Heartbeats
Pages when a job stops checking in.
GET /v1/heartbeats
List heartbeats and their state. The ping URL is never returned after creation.
Access: Read — any key
Response 200
Every heartbeat. Returns {"data": [ … ]}, a list of Heartbeat.
curl "$TEAMPAGER_API/heartbeats" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized429 rate_limited
POST /v1/heartbeats
Create a heartbeat. The ping URL is in this response only. Save it: it can't be read again. A retry with the same Idempotency-Key answers 409 already_created, without the URL.
Access: Read and write · Accepts Idempotency-Key
Body
| Field | Type | Description |
name required | string | 1–80 characters. |
intervalMinutes required | integer 1–10080 | How often your job pings. |
graceMinutes required | integer 1–1440 | Extra time before we page. |
boardId | string or null | Board to page. Default: the organization's default board. |
Response 201
The heartbeat and its ping URL (once). Returns HeartbeatCreated.
curl -X POST "$TEAMPAGER_API/heartbeats" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"nightly-backup","intervalMinutes":1440,"graceMinutes":60}'
Errors
400 invalid_json, unknown_fields, invalid_name, invalid_interval, invalid_grace, invalid_schedule_id401 unauthorized403 insufficient_scope409 idempotency_in_flight, limit_reached, already_created422 idempotency_key_reused429 rate_limited
GET /v1/heartbeats/{id}
One heartbeat and its state.
Access: Read — any key
Parameters
| Field | Type | Description |
id required | path, string | Heartbeat id. |
Response 200
The heartbeat. Returns Heartbeat.
curl "$TEAMPAGER_API/heartbeats/$HEARTBEAT_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized404 not_found429 rate_limited
PATCH /v1/heartbeats/{id}
Rename, pause, resume or retime a heartbeat.
Access: Read and write
Parameters
| Field | Type | Description |
id required | path, string | Heartbeat id. |
Body
| Field | Type | Description |
name | string | 1–80 characters. |
intervalMinutes | integer 1–10080 | |
graceMinutes | integer 1–1440 | |
boardId | string or null | |
paused | boolean | true pauses it: silence pages nobody. |
Response 200
The heartbeat, updated. Returns Heartbeat.
curl -X PATCH "$TEAMPAGER_API/heartbeats/$HEARTBEAT_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"paused":true}'
Errors
400 invalid_json, unknown_fields, invalid_name, invalid_interval, invalid_grace, invalid_paused, invalid_schedule_id401 unauthorized403 insufficient_scope404 not_found429 rate_limited
DELETE /v1/heartbeats/{id}
Delete a heartbeat. Deleting twice is not an error.
Access: Read and write
Parameters
| Field | Type | Description |
id required | path, string | Heartbeat id. |
Response 204
Deleted. No body.
curl -X DELETE "$TEAMPAGER_API/heartbeats/$HEARTBEAT_ID" \
-H "Authorization: Bearer $TEAMPAGER_API_KEY"
Errors
401 unauthorized403 insufficient_scope404 not_found429 rate_limited
Objects
What the endpoints return. Lists are {"data": [ … ]}.
OnCall
Who has the pager on a board, until when, and who is next.
| Field | Type | Description |
board | object | |
board.id | string | |
board.name | string | |
board.timezone | string | |
board.paused | boolean | |
at | date-time | When this answer was computed. |
rotas | object[] | |
rotas[].id | string | |
rotas[].name | string or null | |
rotas[].onCall | object or null | A person, or null when nobody is assigned. |
rotas[].onCall.personId | string | Person id. |
rotas[].onCall.name | string or null | Display name. |
rotas[].onCallUntil | date-time or null | |
rotas[].paging | boolean | |
rotas[].pagingChangesAt | date-time or null | |
rotas[].next | object or null | The next different person on call, or null if nobody is planned. |
rotas[].next.personId | string | |
rotas[].next.name | string or null | |
rotas[].next.from | date-time | When they take over. |
Board
A board (an on-call schedule) and its rotas.
| Field | Type | Description |
id | string | Board id. |
name | string | |
timezone | string | IANA time zone, e.g. America/Toronto. |
paused | boolean | A paused board pages nobody. |
slotUnit | "week" | "day" | "hours_12" | "hours_8" | Length of one on-call slot. |
handover | object | |
handover.weekday | integer 0–6 | 0 = Monday … 6 = Sunday. |
handover.time | string | Local time, HH:MM. |
rotas | Rota[] | |
createdAt | date-time | |
updatedAt | date-time | |
BoardDetail
A board with its absences and the coming slots (the forecast).
| Field | Type | Description |
id | string | Board id. |
name | string | |
timezone | string | IANA time zone, e.g. America/Toronto. |
paused | boolean | A paused board pages nobody. |
slotUnit | "week" | "day" | "hours_12" | "hours_8" | Length of one on-call slot. |
handover | object | |
handover.weekday | integer 0–6 | 0 = Monday … 6 = Sunday. |
handover.time | string | Local time, HH:MM. |
rotas | Rota[] | |
createdAt | date-time | |
updatedAt | date-time | |
absences | object[] | |
absences[].id | string | Absence id. Use it to cancel. |
absences[].personId | string | |
absences[].startsAt | date-time | |
absences[].endsAt | date-time | Exclusive. |
absences[].scope | "board" | "org" | org applies to every board. |
upcoming | object[] | |
upcoming[].rotaId | string | |
upcoming[].slots | Slot[] | Current and coming slots, in order. |
Rota
A rota: who takes turns, and who has the pager now.
| Field | Type | Description |
id | string | Rota id (a board has one or two rotas). |
name | string or null | |
members | RotaMember[] | In rotation order. |
onCall | object or null | A person, or null when nobody is assigned. |
onCall.personId | string | Person id. |
onCall.name | string or null | Display name. |
onCallUntil | date-time or null | End of the current slot. |
paging | boolean | True when this rota pages right now (its paging window is open). |
pagingChangesAt | date-time or null | When paging flips next. |
next | object or null | The next different person on call, or null if nobody is planned. |
next.personId | string | |
next.name | string or null | |
next.from | date-time | When they take over. |
Slot
| Field | Type | Description |
startsAt | date-time | Use this exact value as slotStart in coverage changes. |
endsAt | date-time | |
onCall | object or null | A person, or null when nobody is assigned. |
onCall.personId | string | Person id. |
onCall.name | string or null | Display name. |
away | boolean | True when the slot is a hole because its person is away. |
Chain
If nobody acknowledges: who is paged next, after how long. Escalation stops after the last step.
| Field | Type | Description |
boardId | string | |
waitMinutes | 2 | 5 | 10 | 15 | 30 or null | Board default wait between steps; null = the organization's. |
rotas | object[] | |
rotas[].rotaId | string | |
rotas[].name | string or null | |
rotas[].steps | ChainStep[] | |
ChainStep
| Field | Type | Description |
position | integer 2–4 | 2, 3 or 4. Step 1 is always whoever is on call. |
targetKind | "next_on_rota" | "person" | "everyone_else" | "one_by_one" | next_on_rota, a named person, everyone_else on the rota, or one_by_one. |
personId | string or null | Set when targetKind is person. |
waitMinutes | 2 | 5 | 10 | 15 | 30 or null | Wait before this step; null = the board's default. |
personGone | boolean | The named person left: this step is a hole and escalation stops there. |
Alert
A page (an alert that reached TeamPager).
| Field | Type | Description |
id | string | Page id. |
title | string | |
status | "open" | "acked" | "resolved" | open is still escalating, acked stopped escalating, resolved is over. |
boardId | string or null | |
escalationStep | integer | How far escalation went (1 = on call). |
createdAt | date-time | |
ackedAt | date-time or null | |
ackedBy | ActorRef or null | Who did it: a person or an API key. |
ackedVia | "app" | "link" | "call" | "slack" | "api" or null | |
reopenedAt | date-time or null | |
resolvedAt | date-time or null | |
resolvedBy | ActorRef or null | Who did it: a person or an API key. |
AlertList
| Field | Type | Description |
data | Alert[] | |
nextCursor | string or null | Pass as cursor to get the next page of results; null at the end. |
ActorRef
Who did it: a person or an API key.
| Field | Type | Description |
kind | "person" | "api_key" | |
id | string | Person id, or API key id. |
Person
Someone in the directory. Being in the directory does not need a login.
| Field | Type | Description |
id | string | Person id. Use it in members, chains, absences and coverage. |
name | string or null | |
kind | "human" | "channel" | human, or channel for a shared inbox or team address. |
status | "active" | "suspended" | "removed" | suspended by directory sync (SCIM) is skipped when paged; removed left the organization. |
canSignIn | boolean | True when the person has a login. People created through the API never do. |
createdAt | date-time | |
PersonDetail
| Field | Type | Description |
id | string | Person id. Use it in members, chains, absences and coverage. |
name | string or null | |
kind | "human" | "channel" | human, or channel for a shared inbox or team address. |
status | "active" | "suspended" | "removed" | suspended by directory sync (SCIM) is skipped when paged; removed left the organization. |
canSignIn | boolean | True when the person has a login. People created through the API never do. |
createdAt | date-time | |
channels | Channel[] | |
Channel
One way to reach a person.
| Field | Type | Description |
id | string | Channel id. |
personId | string | |
kind | "email" | "sms" | "voice" | "teams" | "slack" | "push" | "webhook" | How we reach the person. The API creates email, sms and voice; other kinds are read-only. |
address | string | Email address, or phone number masked as +1 ••• ••• 0344. |
rung | 1 | 2 | 3 | Order of the ladder: 1 first, then 2, then 3. |
verified | boolean | A phone stays unverified until the person enters the code in the app. |
optedOut | boolean | The person replied STOP to texts. |
createdAt | date-time | |
OrgAbsence
| Field | Type | Description |
id | string | |
personId | string | |
startDate | date | First day away, YYYY-MM-DD. |
endDate | date | Last day away, inclusive. |
MuteState
| Field | Type | Description |
personId | string | |
mute | object or null | |
mute.endsAt | date-time or null | Null = muted until someone unmutes. |
mute.reason | string or null | |
mute.createdAt | date-time or null | |
Heartbeat
A heartbeat: pages when a job stops checking in.
| Field | Type | Description |
id | string | Heartbeat id. |
name | string | |
boardId | string or null | Board paged when it goes silent; null = the organization's default board. |
intervalMinutes | integer | |
graceMinutes | integer | |
state | "waiting" | "up" | "down" | "paused" | waiting for its first ping, up, down (silent: a page went out), or paused. |
lastPingAt | date-time or null | |
downSince | date-time or null | |
createdAt | date-time | |
HeartbeatCreated
| Field | Type | Description |
id | string | Heartbeat id. |
name | string | |
boardId | string or null | Board paged when it goes silent; null = the organization's default board. |
intervalMinutes | integer | |
graceMinutes | integer | |
state | "waiting" | "up" | "down" | "paused" | waiting for its first ping, up, down (silent: a page went out), or paused. |
lastPingAt | date-time or null | |
downSince | date-time or null | |
createdAt | date-time | |
pingUrl | string | The URL your job calls. Returned once, here only; it can't be read again. |
PageAccepted
| Field | Type | Description |
accepted | true | |
deliveryId | string | Delivery id. The page itself appears in GET /v1/alerts within seconds. |
Error
Every error has this shape.
| Field | Type | Description |
error | object | |
error.code | string | Stable, machine-readable code (snake_case). Branch on this, not on the message. |
error.message | string | One sentence for a human. |
error.requestId | string | Give this to support if you need help with a request. |
error.details | object | Extra facts about the error, e.g. limit and used for a plan limit. |