https://retellai.com/?utm_source=discord&utm_medium=seo logo
I have created a chat agent and inserted the code ...
# ❓・ai-evy-support
b
@AI Evy I have created a chat agent and inserted the code into the head of my site. When testing on retell everything works great. When I test the chat agent on my site, there is no webhook that is triggered. Is this normal? How can I make the chats on my site trigger a webhook? They do show up in my chat history on retell as they should.
a
Thanks for tagging me @BoiledGoose. I'll look through relevant sources and get back to you shortly.
### Answer --- Chat agents support webhooks—you need to configure the
webhook_url
on your chat agent. [(1) ]() [(2) ]() To set up webhooks for your chat agent: You can set the
webhook_url
parameter when creating or updating your chat agent. The webhook will listen to chat events for that agent. Example from the API response showing the webhook configuration:
Copy code
json
{
  "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
  "webhook_url": "<https://webhook-url-here%22,>
  "webhook_timeout_ms": 10000
}
[(1) ]() Key parameters: -
webhook_url
— The webhook URL for the agent to listen to chat events. If set, it binds webhook events for this agent to the specified URL. Set to
null
to remove the webhook URL. [(1) ]() [(2) ]() -
webhook_timeout_ms
— The timeout for the webhook in milliseconds. Default is 10000 (10 seconds) . To configure via API (JavaScript SDK) :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
[(1) ]() You can verify your chat agent's current webhook configuration by retrieving the agent details and checking the
webhook_url
field. If chats appear in your history but webhooks aren't firing, confirm that
webhook_url
is properly set on your chat agent configuration—not just at the account level.
​ To learn more, see the sources I considered: [[1] Get Chat Agent](https://docs.retellai.com/api-references/get-chat-agent) [[2] Create Chat Agent](https://docs.retellai.com/api-references/create-chat-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.