Skip to main content
ElevenLabs Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Twilio personalization

Configure personalization for incoming Twilio calls using webhooks.

When receiving inbound Twilio calls, you can dynamically fetch conversation initiation data through a webhook. This allows you to customize your agent’s behavior based on caller information and other contextual data.

For when the webhook fires and the request shape, see Conversation initiation webhooks.

https://www.youtube-nocookie.com/embed/cAuSo8qNs-8?rel=0

  1. When a Twilio call is received, ElevenAgents will make a webhook call to your specified endpoint, passing call information (caller_id, agent_id, called_number, call_sid, conversation_id) as arguments
  2. Your webhook returns conversation initiation client data, including dynamic variables and overrides (an example is shown below)
  3. This data is used to initiate the conversation
  1. Configure webhook details

    In the settings page of ElevenAgents, configure the webhook URL and add any secrets needed for authentication.

    Enable webhook

    Click on the webhook to modify which secrets are sent in the headers.

    Add secrets to headers
  2. Enable fetching conversation initiation data

    In the “Security” tab of the agent’s page, enable fetching conversation initiation data for inbound Twilio calls, and define fields that can be overridden.

    Enable webhook
  3. Implement the webhook endpoint to receive Twilio data

    The webhook will receive a POST request with the following parameters:

    ParameterTypeDescription
    caller_idstringThe phone number of the caller
    agent_idstringThe ID of the agent receiving the call
    called_numberstringThe Twilio number that was called
    call_sidstringUnique identifier for the Twilio call
    conversation_idstringElevenLabs conversation identifier
  4. Return conversation initiation client data

    Your webhook must return a JSON response containing the initiation data for the agent.

    An example response could be:

    JSON
    {
      "type": "conversation_initiation_client_data",
      "conversation_config_override": {
        "agent": {
          "prompt": {
            "prompt": "The customer's bank account balance is $100. They are based in San Francisco.",
            "llm": "gpt-5.6-luna"
          },
          "first_message": "Hi, how can I help you today?",
          "language": "en"
        },
        "tts": {
          "voice_id": "new-voice-id"
        },
        "conversation": {
          "text_only": false
        }
      },
      "dynamic_variables": {
        "customer_name": "John Doe",
        "account_status": "premium",
        "last_interaction": "2026-01-15"
      },
      "branch_id": "agtbrch_xxxx",
      "environment": "production"
    }

ElevenAgents will use the dynamic variables to populate the conversation initiation data, and the conversation will start smoothly.

  • Use HTTPS endpoints only
  • Implement authentication using request headers
  • Store sensitive values as secrets through the ElevenLabs secrets manager
  • Validate the incoming request parameters
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu