POST
POST /v1/convai/whatsapp/outbound-message — ElevenLabs API
ElevenLabs APISend An Outbound Message Via Whatsapp
- Base URL
- https://api.elevenlabs.io
- Auth
- xi-api-key: <ELEVENLABS_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 232 tokens · Vary: Accept
→ 232 tokens · Vary: Accept
Critical gotchas
Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.
Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.
cURL
curl -X POST 'https://api.elevenlabs.io/v1/convai/whatsapp/outbound-message' \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H 'Content-Type: application/json' \ -d '{ "whatsapp_phone_number_id": "whatsapp-phone-number-id", "whatsapp_user_id": "whatsapp-user-id", "template_name": "example-template-name", "template_language_code": "example-template-language-code", "template_params": [ { "type": "header", "parameters": [ { "parameter_name": "example-parameter-name", "type": "text", "text": "example-text" } ] } ], "agent_id": "agent-id", "conversation_initiation_client_data": { "conversation_config_override": { "agent": { "first_message": "Hello, how can I help you today?", "language": "en", "prompt": { "knowledge_base": [], "llm": "gemini-2.0-flash-001", "prompt": "You are a helpful assistant that can answer questions about the topic of the conversation.", "tool_ids": [] } }, "asr": { "keywords": [ "hello", "world" ] }, "conversation": { "max_duration_seconds": 600 }, "tts": { "model_id": "eleven_turbo_v2", "pronunciation_dictionary_locators": [], "similarity_boost": 0.8, "speed": 1, "stability": 0.5, "voice_id": "cjVigY5qzO86Huf0OWal" }, "turn": { "soft_timeout_config": { "message": "Hhmmmm...yeah." } } }, "custom_llm_extra_body": {}, "user_id": "example-user-id", "source_info": { "source": "unknown", "version": "example-version" }, "branch_id": "example-branch-id", "environment": "example-environment", "starting_workflow_node_id": "example-starting-workflow-node-id", "procedure_ids": [ "example-procedure-ids" ], "dynamic_variables": {} }}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| whatsapp_phone_number_id | body | string | Yes | Request body field whatsapp_phone_number_id. |
| whatsapp_user_id | body | string | Yes | Request body field whatsapp_user_id. |
| template_name | body | string | Yes | Request body field template_name. |
| template_language_code | body | string | Yes | Request body field template_language_code. |
| template_params | body | object[] | Yes | Request body field template_params. |
| agent_id | body | string | Yes | Request body field agent_id. |
| conversation_initiation_client_data | body | object | No | Request body field conversation_initiation_client_data. |
Response 200 OK
{
"conversation_id": "string"
} Get a free ElevenLabs API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.