weronika
05/22/2026, 8:00 AMAI Evy
05/22/2026, 8:00 AMAI Evy
05/22/2026, 8:00 AMwebhook_url field to your endpoint. Events for that agent will be sent to this URL, overriding the account-level webhook. [(1) ]() [(2) ]()
## Setting Agent Webhook via API
When creating a voice agent, include the webhook_url parameter: [(2) ]()
javascript
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: 'retell-Cimo',
webhook_url: "<https://webhook-url-here%22>
}) ;
You can also specify which events to receive using webhook_events (defaults to call_started, call_ended, call_analyzed) . [(1) ]() [(2) ]()
## Your Webhook Endpoint Requirements
Your webhook URL must: [(1) ]()
- Accept POST requests with JSON payloads
- Return a 2xx status code within 10 seconds
- Handle retries (up to 3 attempts if unsuccessful)AI Evy
05/22/2026, 8:00 AMAI Evy
05/22/2026, 8:00 AMweronika
05/22/2026, 8:02 AMAI Evy
05/22/2026, 8:02 AMAI Evy
05/22/2026, 8:02 AMwebhook_url field to your existing agent. [(2) ]() The agent will then send events to your specified endpoint. [(1) ]() [(2) ]()
## Your Webhook Endpoint
You need to create and host your own webhook endpoint that: [(1) ]()
- Accepts POST requests with JSON payloads
- Returns a 2xx status code within 10 seconds
- Can handle retries (up to 3 attempts)
The webhook will receive events like call_started, call_ended, and call_analyzed by default. You can customize which events are delivered using the webhook_events field when updating your agent.AI Evy
05/22/2026, 8:02 AMAI Evy
05/22/2026, 8:02 AM