WhatsApp

WhatsApp message templates

View as MarkdownOpen in Claude

Templates are pre-approved message formats required when reaching out to customers who have not contacted you first. Think of them as pre-written scripts that Meta reviews and approves in advance. Once approved, you can send them to any customer at any time. See Send a template message for how to deliver one.

WhatsApp on SignalWire is in early-access alpha. Template management through the SignalWire Dashboard is planned; today, templates are managed via the API or directly in the Meta Business dashboard.

Template components

A template is made up of components. A Body component is required; the header, footer, and buttons are optional.

ComponentDescription
HEADEROptional title line. Can be plain text or media (image, video, document).
BODYRequired. Main message text. Supports variable placeholders for personalization.
FOOTEROptional closing line (e.g. “Thank you for your order”).
BUTTONSOptional interactive buttons: quick reply, phone number, or URL.

Parameters

Templates support variable placeholders so you can personalize messages with customer names, order numbers, and so on. There are two styles, set by parameter_format:

  • Positional (positional): referenced as {{1}}, {{2}}, {{3}} in order.
  • Named (named): referenced by descriptive labels like {{first_name}} or {{order_status}}.

Categories

The category field must be one of:

  • marketing: promotional messages, offers, announcements
  • utility: transactional messages, order updates, account alerts
  • authentication: one-time passwords and verification codes

Manage templates

Templates are managed through the API. For the full request and response schemas, see the reference:

The example below creates an order-update template with positional parameters. The components array is the heart of the request; each component’s fields depend on its type.

POST
/api/messaging/whatsapp/templates
1curl -X POST https://{your_space_name}.signalwire.com/api/messaging/whatsapp/templates \
2 -H "Content-Type: application/json" \
3 -u "<project_id>:<api_token>" \
4 -d '{
5 "whatsapp_business_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
6 "name": "order_update",
7 "language": "en_US",
8 "category": "utility",
9 "parameter_format": "positional",
10 "components": [
11 {
12 "type": "HEADER",
13 "example": {
14 "header_text": [
15 "Jane Smith"
16 ]
17 },
18 "format": "TEXT",
19 "text": "Order Update for {{1}}"
20 },
21 {
22 "type": "BODY",
23 "example": {
24 "body_text": [
25 [
26 "ORD-9821",
27 "out for delivery"
28 ]
29 ]
30 },
31 "text": "Your order {{1}} is currently {{2}}."
32 },
33 {
34 "type": "FOOTER",
35 "text": "Thank you for shopping with us."
36 },
37 {
38 "type": "BUTTONS",
39 "buttons": [
40 {
41 "text": "Track Order",
42 "type": "QUICK_REPLY"
43 },
44 {
45 "text": "Contact Support",
46 "type": "URL",
47 "url": "https://example.com/support"
48 }
49 ]
50 }
51 ]
52}'

Approval and updates

Templates must be reviewed and approved by Meta before use. Approval typically takes a few minutes to a few hours. A template’s current state is reported in its template_status field. It must be approved before it can be used to send messages.

A template can only be updated while it is not yet approved. Once approved, delete and recreate it to make changes.

Anywhere a template ID is accepted, you can use either the SignalWire template ID (a UUID) or the Meta template ID (a numeric string).