Skip to main content
The wording your messages may use, and the way to ask for more without opening the portal. The sibling of /secure/senders, and everything said there applies: four calls, the same envelope, and what you write is stored awaiting approval and is not usable until your provider decides.

The four calls

Available from gateway 0.9.7. The listing carries the same fields as sender IDs — including the four states, of which only APPROVED is usable — with one difference worth noticing: value is the wording and label is the name you gave it.

Asking for one

The placeholder grammar

Write the message as the regulator writes it, with a placeholder standing in for the part that changes:
Everything around a placeholder is matched exactly. Change a word of it and the message no longer matches the template.

What is refused before it is stored

The wording is checked by the same code that will compile it if approved, so anything accepted here will load. Four refusals, each with a reason:
Refused here even though a template already stored this way still loads. Before the row exists there is no cost to being strict, and accepting it would approve a template that matches more than you meant.
Longer than any message a template could approve.
Wording with no placeholder at all is legitimate and is the strictest template there is: it approves exactly one message and nothing else.

Changing one

PUT replaces rather than patches — a field you do not send is cleared. Send the whole row.
A template’s name is judged, unlike a sender ID’s label. Changing either the wording or the name on an approved template puts it back to PENDING and it stops being accepted until your provider approves it again.The asymmetry is not arbitrary: the name is what your provider read the wording under, so a changed name means the decision was about something else. A sender ID’s label is matched by nothing and can be changed freely.
Send "confirm_suspend": true to proceed with an edit that would suspend a live template, and read the status on the response.

Errors

The same set as /secure/senders — 400, 404, 409, 412, 429 and 503, with the message naming which.

Sender IDs

The same four calls for the names you send from.

Sender IDs and templates

The same thing through the portal.