Destination type
Twilio WhatsApp Destination
Use Twilio WhatsApp destinations when routed events should become WhatsApp notifications for operations, support handoffs, lifecycle alerts, or customer messaging workflows.
When to use this destination type
Choose TWILIO_WHATSAPP when the receiver target is Twilio Messages API for WhatsApp. Destinations are outbound delivery targets: they do not decide whether a source request should be accepted, and they do not own connection filters or transformations. They own where the final delivery goes and how FastHook should authenticate, pace, disable, and inspect that delivery.
A destination can be reused by multiple connections when several source branches should feed the same receiver. Reuse keeps receiver capacity, credentials, and attempt evidence attached to one destination id.
FastHook dashboard fields
In the dashboard, create a destination, set Destination Type to TWILIO_WHATSAPP, then fill the fields below.
From senderTwilio WhatsApp sender. Use whatsapp:+14155238886 for the Sandbox or your approved production sender. It must be different from To recipient.
To recipientRecipient WhatsApp address or a rendered template value. Sandbox recipients must join your Sandbox from that exact WhatsApp number.
Message bodyPlain message body template with FastHook tokens such as {{event_id}} and {{payload.customer.phone}}.
Messaging Service SIDOptional MG... service SID. Required for Content SID template sends and common in production sender pools.
Content SIDOptional HX... approved Twilio content template for business-initiated messages outside the 24-hour service window.
Content variables JSONOptional JSON object used as Twilio ContentVariables after template rendering, usually with numeric keys such as "1".
Account SIDTwilio AC... account identifier from Twilio Console or API keys & tokens.
Auth TokenTwilio account auth token from API keys & tokens. Treat it as a secret and rotate it if exposed.
Max delivery rateBuilt-in one message per second pacing.
API config fields
The REST API stores destination-specific behavior under config. Use PATCH for focused edits and PUT only when your request contains the full config you want to keep.
config.toRequired WhatsApp recipient address, such as whatsapp:+37120000000. Supports template tokens; rendered values may omit whatsapp: and FastHook will add it.
config.fromTwilio WhatsApp sender address. Use whatsapp:+14155238886 for the Sandbox, or your approved production WhatsApp sender. Required unless config.messaging_service_sid is set.
config.body_templateFree-form message body template. Works inside WhatsApp's 24-hour customer service window; outside that window use Content SID templates.
config.messaging_service_sidOptional Twilio Messaging Service SID starting with MG. Required when sending Content API templates with config.content_sid.
config.content_sidOptional Twilio Content SID starting with HX for approved WhatsApp templates.
config.content_variables_templateOptional JSON object template for Twilio ContentVariables, for example {"1":"{{payload.customer.name}}"}.
config.auth_typeTWILIO_AUTH_TOKEN.
config.auth.account_sidTwilio Account SID used in the Messages API URL and Basic Auth username.
config.auth.auth_tokenTwilio Auth Token used as the Basic Auth password.
config.rate_limitBuilt-in delivery pacing for WhatsApp messages.
config.rate_limit_periodRate-limit period. Twilio WhatsApp destinations use second.
{
"name": "ops-whatsapp-alerts",
"type": "TWILIO_WHATSAPP",
"config": {
"from": "whatsapp:+14155238886",
"to": "whatsapp:{{payload.customer.phone}}",
"body_template": "FastHook event {{event_id}}\n{{payload}}",
"messaging_service_sid": null,
"content_sid": null,
"content_variables_template": null,
"auth_type": "TWILIO_AUTH_TOKEN",
"auth": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "twilio-auth-token"
},
"rate_limit": 1,
"rate_limit_period": "second"
}
}curl -X POST "https://api.fasthook.io/v1/destinations" \
-H "Authorization: Bearer $FASTHOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ops-whatsapp-alerts",
"type": "TWILIO_WHATSAPP",
"config": {
"from": "whatsapp:+14155238886",
"to": "whatsapp:{{payload.customer.phone}}",
"body_template": "FastHook event {{event_id}}\n{{payload}}",
"messaging_service_sid": null,
"content_sid": null,
"content_variables_template": null,
"auth_type": "TWILIO_AUTH_TOKEN",
"auth": {
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"auth_token": "twilio-auth-token"
},
"rate_limit": 1,
"rate_limit_period": "second"
}
}'Authentication
Destination authentication is outbound. It helps the receiver trust or accept FastHook delivery, and it is separate from source authentication that verifies the original webhook producer.
- Twilio Account SID and Auth Token
- Twilio WhatsApp Sandbox join flow for testing
- Approved Twilio WhatsApp sender or Messaging Service for production
HTTP methods and rate limit
This destination type uses the methods below for delivery attempts. Rate limits apply at the destination boundary, so every connection that targets the same destination shares that capacity.
Rate limit: Locked to 1 request per second.
Delivery behavior
- FastHook renders message templates per delivery and sends through Twilio's Messages API.
- WhatsApp addresses use the whatsapp:+E.164 format. Rendered template values can omit the prefix and FastHook will add it.
- For Sandbox testing, each recipient must send the join code from the exact WhatsApp account that should receive messages.
- A Twilio API 201 response means Twilio accepted the message. Final delivery can still move through queued, sent, delivered, read, or failed in Twilio message logs.
- Outside WhatsApp's 24-hour customer service window, Twilio requires an approved content template. Use Content SID and Content variables for that flow.
- Twilio WhatsApp destinations are locked to 1 request per second to avoid message bursts.
Setup checklist
- For Sandbox testing, open Twilio Console, activate the WhatsApp Sandbox, and copy the Sandbox join code.
- Have the recipient send join <your sandbox code> to +14155238886 from the exact WhatsApp or WhatsApp Business account that should receive messages.
- Create a FastHook destination and choose TWILIO_WHATSAPP as the destination type.
- Set From sender to whatsapp:+14155238886 for the Sandbox, or to an approved Twilio WhatsApp sender or Messaging Service SID for production.
- Set To recipient to the target WhatsApp address, or use a template token that renders to a +E.164 phone number.
- Paste the Twilio Account SID and Auth Token from Twilio Console API keys & tokens.
- For production business-initiated messages outside the customer service window, add a Messaging Service SID, Content SID, and Content variables JSON.
- Connect only WhatsApp-worthy events through filters before routing to the destination.
Troubleshooting
Attempts fail with a Twilio 400 error.Check that From and To use WhatsApp-capable numbers and whatsapp:+E.164 formatting, or use a Messaging Service SID configured for WhatsApp.
Attempts fail with Twilio error 63015.The Sandbox can only send to numbers that joined that Sandbox. Send join <your sandbox code> from the recipient WhatsApp account to +14155238886, then retry.
Attempts fail with Twilio error 63031.From and To are the same WhatsApp address. Use the Twilio Sandbox sender, an approved production sender, or a Messaging Service SID that is different from the recipient.
Template messages fail outside the service window.Use an approved Twilio Content SID with Messaging Service SID and valid Content variables JSON.
Attempts fail with authentication errors.Check config.auth.account_sid and config.auth.auth_token, then rotate the Auth Token if it was exposed or revoked.
Twilio returns 201 but the recipient does not see the message.Open Twilio message logs for the message SID and check the final status and error_code. FastHook records the Twilio response body on the attempt.