#If i use v1/convai/whatsapp/outbound-message to send a message to a user while there is already an
1 messages · Page 1 of 1 (latest)
Short answer: It starts a new conversation.
What the docs say:
- The WhatsApp page states you can start a conversation by sending an outbound message. (elevenlabs.io)
- The API reference for POST /v1/convai/whatsapp/outbound-message returns a conversation_id for the message you send (behavior documented as sending an outbound message using a template). There is no mention of attaching to an already-active conversation. (elevenlabs.io)
- The changelog explicitly describes this endpoint as added to initiate conversations via WhatsApp using message templates. (elevenlabs.io)
If you need to send a WhatsApp message as part of an already-active conversation (and keep the same context), use the WhatsApp “Send Message” integration tool from within the agent flow instead of calling the outbound-message endpoint. (elevenlabs.io)
Sources:
WhatsApp | ElevenLabs Documentation
Outbound message via WhatsApp | ElevenLabs Documentation
February 9, 2026 | ElevenLabs Documentation
WhatsApp tools | ElevenLabs Documentation
can you share an example for this endpoint structure using http? with sample values to dynamically fill in template variables like {{customer_name}} and {{company}}.
Short answer:
- Put placeholders in your agent prompt like: Hello {{customer_name}} from {{company}}.
- Pass values over HTTP either:
- in a POST request’s conversation_initiation_client_data.dynamic_variables, or
- as query params to the public Talk-to page.
Examples:
A) HTTP POST (Twilio outbound call) with dynamic variables
curl -X POST https://api.elevenlabs.io/v1/convai/twilio/outbound-call
-H "Content-Type: application/json"
-H "xi-api-key: YOUR_API_KEY"
-d '{
"agent_id": "agent_123",
"agent_phone_number_id": "pn_456",
"to_number": "+15551234567",
"conversation_initiation_client_data": {
"type": "conversation_initiation_client_data",
"dynamic_variables": {
"customer_name": "Jane Doe",
"company": "Acme Corp"
}
}
}'
References: Twilio outbound-call endpoint and the conversation_initiation_client_data schema. (elevenlabs.io)
B) HTTP GET (public Talk-to page) with dynamic variables
- Individual params:
https://elevenlabs.io/app/talk-to?agent_id=your_agent_id&var_customer_name=Jane Doe&var_company=Acme Corp - Or base64-encoded JSON:
https://elevenlabs.io/app/talk-to?agent_id=your_agent_id&vars=eyJjdXN0b21lcl9uYW1lIjoiSmFuZSBEb2UiLCJjb21wYW55IjoiQWNtZSBDb3JwIn0=
Details and precedence rules are in the Dynamic variables “Public Talk-to Page Integration.” (elevenlabs.io)
Notes:
- Use double curly braces in prompts: {{variable_name}}; names are case‑sensitive and must match what you send in dynamic_variables. (elevenlabs.io)
- If required dynamic variables are missing, calls can fail (“Missing required dynamic variables …”). Check Call History for the error. (help.elevenlabs.io)
Sources:
Outbound call via twilio | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Where can I locate the reason for my call failing? – ElevenLabs
no i mean to fill in variables for an outbound whatsapp message, specifically for the template_params array
You pass template parameters as a component list with type "body" and a parameters array of text objects. Example (HTTP):
POST https://api.elevenlabs.io/v1/convai/whatsapp/outbound-message
Content-Type: application/json
xi-api-key: YOUR_API_KEY
{
"whatsapp_phone_number_id": "123456789012345",
"whatsapp_user_id": "198765432109876",
"template_name": "order_update",
"template_language_code": "en_US",
"template_params": [
{
"type": "body",
"parameters": [
{ "text": "Alice Johnson" }, // fills {{customer_name}}
{ "text": "Acme Corp" } // fills {{company}}
]
}
],
"agent_id": "agent_abc123"
}
This mirrors the API’s required shape for template_params (body component with parameters containing text values). Create the template in WhatsApp Manager first, then call this endpoint. (elevenlabs.io)
Sources:
Outbound message via WhatsApp | ElevenLabs Documentation
Im using named params in my whatsapp template. How would I do that then? Does the API support named params?
Short answer: use positional parameters. The ElevenLabs WhatsApp outbound API documents template_params as an ordered array of component objects (e.g., type: "body") each with a parameters array of values. It does not document a way to pass parameter names, so you should supply values in the order the variables appear in your WhatsApp template.
Example (positional body params):
- parameters[0] maps to the first variable in your template (e.g., {{customer_name}})
- parameters[1] maps to the second (e.g., {{company}})
cURL shape:
- POST /v1/convai/whatsapp/outbound-message
- body:
{
"whatsapp_phone_number_id": "...",
"whatsapp_user_id": "...",
"template_name": "template_name",
"template_language_code": "en_US",
"template_params": [
{
"type": "body",
"parameters": [
{ "text": "Alice" },
{ "text": "Acme Corp" }
]
}
],
"agent_id": "..."
}
Reference and sample payload shape: Outbound message via WhatsApp API. (elevenlabs.io)
Notes:
- The API supports component types for header/body/buttons in template_params; use the appropriate component type(s) and pass their parameters positionally. (elevenlabs.io)
- If you’re sending via the “WhatsApp tool” inside Agents, it currently only supports parameters in the message body. (elevenlabs.io)
In short, named params aren’t documented/supported; pass values in order via the parameters array. (elevenlabs.io)
Sources:
Outbound message via WhatsApp | ElevenLabs Documentation
February 9, 2026 | ElevenLabs Documentation
WhatsApp tools | ElevenLabs Documentation
Outbound message via WhatsApp | ElevenLabs Documentation
@lament abyss You can pass parameters by name: https://elevenlabs.io/docs/api-reference/whats-app/outbound-message#request.body.template_params.body.parameters.parameter_name