https://retellai.com/?utm_source=discord&utm_medium=seo logo
How do I get a webhook url for my agent
# ❓・ai-evy-support
w
@AI Evy How do I get a webhook url for my agent?
a
Thanks for tagging me @weronika. I'll look through relevant sources and get back to you shortly.
### Answer You don't get a webhook URL from Retell AI—you provide your own webhook URL to Retell AI so it can send event notifications to your server. [(1) ]() [(2) ]() ## How to Set Up Webhooks There are two types of webhooks you can configure: [(1) ]() **Account-level webhooks**: Set up through the dashboard's webhooks tab. These notify you of events related to any agent under your account. **Agent-level webhooks**: When you create or update an agent, set the
webhook_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) ]()
Copy code
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)
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
w
@AI Evy I already have a published agent, how can I get a webhook url?
a
Thanks for the follow-up, @weronika. I'll get back to you soon.
### Answer You don't "get" a webhook URL from Retell AI—you need to provide your own webhook endpoint URL to Retell AI. [(1) ]() Since you already have a published agent, you need to update it to add your webhook URL. [(2) ]() ## Update Your Agent's Webhook URL You can add a webhook URL to your existing agent in two ways: **Via Dashboard**: Navigate to your agent settings and add the webhook URL in the agent configuration. [(1) ]() **Via API**: Use the Update Agent API to add the
webhook_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.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.