Templates
Messages you save once and send again, on SMS and WhatsApp.
A template is a message you save once and send again, filled in for each person. Every template has a name, a channel and a category. Your system sends one by name, with Send templates.
Channels
- SMS templates are yours: saved in Goomzo and ready at once.
- WhatsApp templates are reviewed by Meta. Goomzo submits the ones you write, syncs the ones on your WhatsApp account, and sends only approved ones.
Categories
| Category | For |
|---|---|
marketing | Offers, news and anything that promotes. |
utility | Updates someone needs, such as an order or a booking. |
authentication | One-time codes. |
On WhatsApp, the category is Meta's and decides the price. Meta can move a template it judges wrong:
categoryChange says so before it happens.
The template object
{
"id": "tpl_4hq2v9n1c8x0t6pk",
"name": "auth_1",
"channel": "sms",
"category": "authentication",
"content": { "text": "Hi {{name|there}}, your code is {{secret.code}}." },
"whatsapp": null,
"variables": [{ "key": "code", "private": true }],
"problem": null
}| Field | Description |
|---|---|
content | Object or null. What an SMS template says. null for WhatsApp. |
whatsapp | Object or null. The WhatsApp template it sends: name, language, and the values for its blanks. |
variables | Array. What your system passes when it sends it. private ones are masked once sent. |
problem | String or null. Why it can't be sent now, such as a WhatsApp template still in review. |
Endpoints
| Request | Does |
|---|---|
GET /v1/templates | Lists your templates, by channel or category. |
POST /v1/templates | Saves a template. |
GET /v1/templates/{id} | Gets one. |
PATCH /v1/templates/{id} | Changes one. |
DELETE /v1/templates/{id} | Deletes one. |
GET /v1/whatsapp/templates | Lists the templates on your WhatsApp account, as last synced. |
Next steps
Last updated