Skip to content

API reference

API: Emergency dispatch

Markdown version

MethodPathWhat it doesScope
GET/v1/dispatchEmergency dispatch: settings (categories, triage script, ladder, owners), on-call shifts and recent emergenciessettings:read
PUT/v1/dispatchChange emergency dispatch (owner): categories and their keywords, the triage questions, routine words, the escalation ladder (people or whoever is on call, channels, wait, repeats), the maximum paging time and the owners told when nobody acceptssettings:write
POST/v1/dispatch/incidentsReport an emergency by hand and page the ladder (owner)settings:write
GET/v1/dispatch/incidents/:idOne emergency and its timeline: every page per channel and its delivery, the acceptance, the owner notice, what the caller was toldsettings:read
POST/v1/dispatch/incidents/:id/ackAccept an emergency (any member): paging stops and the caller is texted your first namecalls:write
POST/v1/dispatch/incidents/:id/cancelStop paging an emergency (owner), with the reasonsettings:write
POST/v1/dispatch/incidents/:id/pagePage an emergency that was held for review (over the hourly paging cap) (owner)settings:write
POST/v1/dispatch/shiftsAdd an on-call shift or override (owner); overrides win while they runsettings:write
DELETE/v1/dispatch/shifts/:idRemove an on-call shift (owner)settings:write
POST/v1/dispatch/triage-previewTry the triage rules on a descriptionsettings:read

Examples

GET /v1/dispatch

Emergency dispatch: settings (categories, triage script, ladder, owners), on-call shifts and recent emergencies

curl -s "https://api.closefinch.com/v1/dispatch" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/dispatch`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

PUT /v1/dispatch

Change emergency dispatch (owner): categories and their keywords, the triage questions, routine words, the escalation ladder (people or whoever is on call, channels, wait, repeats), the maximum paging time and the owners told when nobody accepts

curl -s -X PUT "https://api.closefinch.com/v1/dispatch" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/dispatch/incidents

Report an emergency by hand and page the ladder (owner)

curl -s -X POST "https://api.closefinch.com/v1/dispatch/incidents" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/incidents`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/dispatch/incidents/$ID

One emergency and its timeline: every page per channel and its delivery, the acceptance, the owner notice, what the caller was told

curl -s "https://api.closefinch.com/v1/dispatch/incidents/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/dispatch/incidents/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/dispatch/incidents/$ID/ack

Accept an emergency (any member): paging stops and the caller is texted your first name

curl -s -X POST "https://api.closefinch.com/v1/dispatch/incidents/$ID/ack" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/incidents/${id}/ack`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/dispatch/incidents/$ID/cancel

Stop paging an emergency (owner), with the reason

curl -s -X POST "https://api.closefinch.com/v1/dispatch/incidents/$ID/cancel" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/incidents/${id}/cancel`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/dispatch/incidents/$ID/page

Page an emergency that was held for review (over the hourly paging cap) (owner)

curl -s -X POST "https://api.closefinch.com/v1/dispatch/incidents/$ID/page" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/incidents/${id}/page`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/dispatch/shifts

Add an on-call shift or override (owner); overrides win while they run

curl -s -X POST "https://api.closefinch.com/v1/dispatch/shifts" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/shifts`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/dispatch/shifts/$ID

Remove an on-call shift (owner)

curl -s -X DELETE "https://api.closefinch.com/v1/dispatch/shifts/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/dispatch/shifts/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/dispatch/triage-preview

Try the triage rules on a description

curl -s -X POST "https://api.closefinch.com/v1/dispatch/triage-preview" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/dispatch/triage-preview`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.