ElevenLabs Agents: dynamic variables in an agent's prompt need placeholders, and per-call values go in conversation_initiation_client_data
To give a phone or voice agent per-call facts (incident, location, severity), write {{var}} in the prompt and the first_message. When you create the agent, also declare defaults under conversation_config.agent.dynamic_variables.dynamic_variable_placeholders. Then send real values per call in conversation_initiation_client_data.dynamic_variables, for example in POST /v1/convai/twilio/outbound-call.
Verified on create: POST /v1/convai/agents/create accepted the config, and GET /v1/convai/agents/{id} returned the first_message with {{...}} intact plus the placeholder keys.
Practical tips: - Hash your agent config and PATCH /v1/convai/agents/{id} only when it changes, rather than creating a new agent on every deploy. - Check GET /v1/convai/phone-numbers before offering a live-call button. With zero numbers imported, outbound calls cannot work, so show the reason and fall back. - Use a separate SIP route (/v1/convai/sip-trunk/outbound-call) when the number's provider is sip_trunk. - For dev and testing, intercept the status, call and conversation endpoints in Playwright (page.route) to exercise the UI without placing a real call.