8 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.
GET /api/organisation/sms-alerts
Whether text message alerts are allowed for the organisation, its allowance of message parts a month and what it used this month
Responses:
| Status | Meaning |
|---|---|
| 200 | allowed, parts_per_month (null = no limit, 0 = not part of the plan), parts_used_this_month and wording |
| 401 | Missing or invalid API key (Error) |
PUT /api/organisation/sms-alerts
Allow text message alerts for the organisation, or stop them (owners and admins, signed in to the web app). Off by default.
Until an owner or admin allows them, nobody in the organisation can add a number and nothing is texted, because monitor names in alerts go to the SMS provider. Stopping them keeps members' numbers but sends nothing. Logged in the activity.
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
allowed | boolean | Yes |
Responses:
| Status | Meaning |
|---|---|
| 200 | The setting |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Not an admin or owner |
GET /api/me/sms-alerts
Your own mobile number for outage texts in the organisation you have open (masked), and whether texts are on (signed in to the web app)
Responses:
| Status | Meaning |
|---|---|
| 200 | available, org_allowed, plan_allows, number (masked, or null), verified, pending_code, sms_down, on_call_now, agreement (the wording to agree to) and stop_hint |
| 401 | Missing or invalid API key (Error) |
| 403 | Not signed in to the web app with your own account |
PUT /api/me/sms-alerts
Switch "Text me about outages" on or off for your verified number. The person on call gets outage texts either way.
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
sms_down | boolean | Yes |
Responses:
| Status | Meaning |
|---|---|
| 200 | Your setting |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 409 | No verified number yet |
DELETE /api/me/sms-alerts
Remove your number from this organisation (it is deleted)
Responses:
| Status | Meaning |
|---|---|
| 204 | Removed |
| 401 | Missing or invalid API key (Error) |
PUT /api/me/sms-alerts/number
Add or change your own mobile number; a 6-digit code is texted to it
Only your own number: admins cannot add one for anyone else. A UK mobile number for now. agree must be true (the agreement wording). The number is stored encrypted and gets no texts until the code is entered. At most 3 codes an hour and 5 a day. Refused until an owner or admin allows text message alerts for the organisation.
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
number | string | Yes | A UK mobile number, for example 07700 900123 or +44 7700 900123. |
agree | boolean | Yes |
Responses:
| Status | Meaning |
|---|---|
| 200 | Your number (masked) |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 402 | Text message alerts are not part of the organisation's plan |
| 409 | An owner or admin has not allowed text message alerts for the organisation |
| 429 | Too many codes |
| 502 | The code could not be sent |
POST /api/me/sms-alerts/verify
Enter the code texted to your number (10 minutes, 5 tries); texts about outages are then on
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | 6 digits. |
Responses:
| Status | Meaning |
|---|---|
| 200 | Your number |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 409 | No number is waiting for a code |
| 410 | The code expired or was tried too many times |
POST /api/me/sms-alerts/resend
Text a new code to the number waiting for one
Responses:
| Status | Meaning |
|---|---|
| 200 | Your number |
| 401 | Missing or invalid API key (Error) |
| 409 | No number is waiting for a code |
| 429 | Too many codes |