Ahmad
01/21/2026, 11:19 AMAI Evy
01/21/2026, 11:19 AMAI Evy
01/21/2026, 11:19 AMchat_analysis object from the Get Chat API endpoint after the chat ends. [(1) ]()
The chat_analysis object includes:
- **chat_summary**: A summary of the chat conversation
- **user_sentiment**: The sentiment of the user (e.g., "Positive")
- **chat_successful**: Whether the chat was successful (boolean)
- **custom_analysis_data**: Any custom analysis data you've defined
Here's how to retrieve it using the SDK:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
You can also configure custom post-chat analysis when creating or updating your chat agent by setting: [(2) ]()
- `post_chat_analysis_data`: Define custom data fields to extract (string, number, boolean, or selector types)
- `post_chat_analysis_model`: Choose the model for analysis (defaults to gpt-4.1-mini)
- `analysis_successful_prompt`: Custom prompt to evaluate chat success
- `analysis_summary_prompt`: Custom prompt for summarization
To receive the analysis automatically when ready, subscribe to the chat_analyzed webhook event. [(1) ]()AI Evy
01/21/2026, 11:19 AMAI Evy
01/21/2026, 11:19 AMAhmad
01/21/2026, 11:21 AMAI Evy
01/21/2026, 11:21 AMAI Evy
01/21/2026, 11:21 AMwebhook_url field should be set on your chat agent. You can verify this by checking your agent configuration—it should show the URL you've set. [(1) ]()
2. Check the webhook timeout setting
The webhook_timeout_ms parameter controls the timeout for the webhook in milliseconds. If not set, the default value of 10000 (10 seconds) applies.
3. Ensure your agent is published
If your chat agent is not published (is_published: false) , this could affect webhook delivery.
4. Known issue with webhooks
There have been reports of webhook URLs not saving correctly or being removed in certain scenarios. One community member noted that saving a conversation agent would cause the webhook on the phone number to be lost. [(2) ]() While this was reported for voice agents, similar behavior could potentially affect chat agents.
Troubleshooting steps:
- Double-check that the webhook URL is still saved after you navigate away and return to the agent settings
- Verify your webhook endpoint is publicly accessible and returns a response within the timeout period
- Check if you have an account-level webhook configured, as the agent-level webhook should override it when set [(1) ]()
If the issue persists after verifying these settings, I'd recommend reaching out to Retell support directly for further investigation.
Check out these potentially useful sources: [Create Chat Agent]() , [Webhook Overview]()AI Evy
01/21/2026, 11:21 AMAI Evy
01/21/2026, 11:21 AM