AperioFlow Start free

Docs API reference

API: text message alerts

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:

StatusMeaning
200allowed, parts_per_month (null = no limit, 0 = not part of the plan), parts_used_this_month and wording
401Missing 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).

FieldTypeRequiredDescription
allowedbooleanYes

Responses:

StatusMeaning
200The setting
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
403Not 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:

StatusMeaning
200available, 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
401Missing or invalid API key (Error)
403Not 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).

FieldTypeRequiredDescription
sms_downbooleanYes

Responses:

StatusMeaning
200Your setting
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
409No verified number yet

DELETE /api/me/sms-alerts

Remove your number from this organisation (it is deleted)

Responses:

StatusMeaning
204Removed
401Missing 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).

FieldTypeRequiredDescription
numberstringYesA UK mobile number, for example 07700 900123 or +44 7700 900123.
agreebooleanYes

Responses:

StatusMeaning
200Your number (masked)
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
402Text message alerts are not part of the organisation's plan
409An owner or admin has not allowed text message alerts for the organisation
429Too many codes
502The 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).

FieldTypeRequiredDescription
codestringYes6 digits.

Responses:

StatusMeaning
200Your number
400The request body is invalid or is not valid JSON (Error)
401Missing or invalid API key (Error)
409No number is waiting for a code
410The 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:

StatusMeaning
200Your number
401Missing or invalid API key (Error)
409No number is waiting for a code
429Too many codes

Start free All the docs Video guides

Built for the people who write the code and answer the phone when it breaks.

Run from the UK. Hosted in the UK and Europe.

UK time --:--

Already in?Open the app Start free today
View our policies