https://retellai.com/?utm_source=discord&utm_medium=seo logo
I want to register the same webhook for an outboun...
# ❓・ai-evy-support
d
@AI Evy I want to register the same webhook for an outbound agent. Is that allowed? And if it is, why does the same webhook return 200 OK when used with the outbound agent, but returns 404 when I test it with the inbound agent using the same URL? What could be the reason?
a
Thanks for tagging me @dropsofsteel. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can use the same webhook URL for both inbound and outbound agents, but there's an important distinction in how they work [(1) ]() [(2) ]() . Key difference between inbound and regular webhooks: The inbound webhook is specifically designed to handle incoming calls or SMS before they're connected [(1) ]() . It's configured at the phone number level and sends a
call_inbound
or
chat_inbound
event . The webhook must respond within 10 seconds with a 200 status code, and you can override agent settings, set dynamic variables, or reject the call in the response . Regular agent webhooks (like
call_started
,
call_ended
,
call_analyzed
) are event notifications that fire during or after the call [(2) ]() . These are configured at the agent level or account level . Why you might see different behavior: 1. **Different event payloads**: The inbound webhook expects a specific payload structure with
call_inbound
or
chat_inbound
event type [(1) ]() , while regular webhooks send different event types like
call_started
or
call_ended
[(2) ]() . 2. **Response expectations**: The inbound webhook expects a JSON response with fields grouped under
call_inbound
or
chat_inbound
[(1) ]() , while regular event webhooks just need a 200 OK acknowledgment [(2) ]() . 3. **Configuration location**: Inbound webhooks are set via
inbound_webhook_url
on the phone number configuration [(1) ](
atures/inbound-call-webhook) [(3) ]() , while agent-level webhooks are set via
webhook_url
on the agent [(2) ]() . If your webhook returns 404 for inbound but 200 for outbound, your webhook handler might not be routing the
call_inbound
event type correctly, or the endpoint path differs between the two configurations.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[3] List Phone Numbers](https://docs.retellai.com/api-references/list-phone-numbers) ​
d
@AI Evy I was Talking about Webhook Settings inside an agent. WHich sends after the call
a
Thanks for the follow-up, @dropsofsteel. I'll get back to you soon.
he payload to your endpoint with a timeout of 10 seconds . If within 10 seconds no success status (2xx) is received, the webhook will be retried up to 3 times . To debug, check your webhook logs to see what's different about the payloads from the inbound vs outbound agent calls.
### Answer Yes, you can absolutely use the same webhook URL for both inbound and outbound agents [(1) ]() [(2) ]() [(3) ]() . The agent-level webhook (configured via the
webhook_url
field when creating or updating an agent) works identically for both inbound and outbound calls [(1) ]() [(2) ]() . When you set
webhook_url
on an agent, any event associated with that agent will be pushed to that webhook URL [(1) ]() . The webhook receives the same event types (
call_started
,
call_ended
,
call_analyzed
, etc.) regardless of whether the call is inbound or outbound . Regarding the 404 error with your inbound agent: Since the same webhook URL returns 200 OK for the outbound agent but 404 for the inbound agent, the issue is likely not with Retell's webhook system but with your webhook endpoint implementation. Here are potential causes: 1. **Routing logic**: Your webhook handler might have conditional routing based on the payload content (like
direction
field being "inbound" vs "outbound") [(4) ]() [(5) ]() 2. **Agent ID filtering**: Your endpoint might be checking the
agent_id
in the payload and only accepting certain agent IDs [(1) ]() [(4) ]() 3. **Event type handling**: Verify your endpoint handles all event types (
call_started
,
call_ended
,
call_analyzed
) [(1) ]() The webhook will POST t
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@AI Evy Nope. No Routing Logic no filtering no event type handling
a
Thanks for the follow-up, @dropsofsteel. I'll get back to you soon.
### Answer [(1) ]() [(2) ]() [(3) ]() If you have no routing logic, filtering, or event type handling, and the same webhook URL works for your outbound agent but returns 404 for your inbound agent, here are the most likely causes: 1. Agent webhook configuration issue Verify both agents have the exact same
webhook_url
configured [(1) ]() [(3) ]() . When you set the
webhook_url
field on an agent, events for that agent are pushed to that URL [(1) ]() . 2. Webhook signature verification Check if your webhook endpoint is verifying the
x-retell-signature
header . If verification is failing for one agent but not the other, it could return different status codes. 3. Server-side URL handling The 404 suggests your server can't find the endpoint. Double-check: - Both agent webhook URLs are identical (no trailing slashes, query parameters, or typos) - Your server logs to see what URL path is actually being requested - Whether your hosting provider has any rate limiting or request filtering 4. Webhook timeout The webhook has a 10-second timeout [(1) ]() [(3) ]() . If your inbound agent calls are triggering slower processing, the request might be timing out and Retell is interpreting it as a 404. Debug steps: 1. Check your server access logs for both webhook requests 2. Verify the exact URLs configured in both agents match character-for-character 3. Test your webhook URL directly with a POST request containing a sample
call_started
payload [(1
) ]() 4. Ensure your webhook endpoint returns a 2xx status code within 10 seconds
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[3] 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.