eclipsewaste
11/19/2025, 5:27 AMAI Evy
11/19/2025, 5:27 AMAI Evy
11/19/2025, 5:27 AMcall_started, call_ended, and call_analyzed [(1) ]() . The documentation does not mention chat_started, chat_ended, or chat_analyzed events .
The three documented webhook event types are :
- call_started - Triggered when a new call begins
- call_ended - Triggered when a call completes, transfers, or encounters an error
- call_analyzed - Triggered when call analysis is complete
If you previously had SMS/chat webhooks working and they've stopped, I don't have specific information in the available sources about separate chat webhook event types or how SMS events are handled differently from voice call events.
I'd recommend checking your webhook endpoint logs to see what event types (if any) Retell is currently sending, and verifying your webhook URL is correctly configured in the Retell dashboard. If the issue persists, you may want to reach out through the official support channels:
- Visit [Contact Sales]()
- Visit [)
Would you like me to provide a general answer based on my broader knowledge of how webhook systems typically work?AI Evy
11/19/2025, 5:27 AMAI Evy
11/19/2025, 5:27 AMeclipsewaste
11/19/2025, 5:29 AMeclipsewaste
11/19/2025, 5:29 AMAI Evy
11/19/2025, 5:29 AMAI Evy
11/19/2025, 5:30 AMAI Evy
11/19/2025, 5:30 AMcall_started, call_ended, and call_analyzed [(1) ]() . The documentation does not explicitly cover separate webhook events for web chat or SMS interactions.
To receive data from your website chat agent, you'll need to set up a webhook endpoint that accepts these call events [(2) ]() . Here's how to configure it:
1. Create your webhook endpoint that accepts POST requests :
javascript
// install the sdk: <https://docs.retellai.com/get-started/sdk>
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Call started event received", call.call_id) ;
break;
case "call_ended":
console.log("Call ended event received", call.call_id) ;
break;
case "call_analyzed":
console.log("Call analyzed event received", call.call_id) ;
break;
default:
console.log("Received an unknown event:", event) ;
}
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;AI Evy
11/19/2025, 5:30 AMAI Evy
11/19/2025, 5:30 AMeclipsewaste
11/19/2025, 5:33 AMAI Evy
11/19/2025, 5:34 AMAI Evy
11/19/2025, 5:34 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.createSMSChat({
from_number: '+12137771234',
to_number: '+14155551234',
}) ;
console.log(chatResponse.agent_id) ;
For SMS functionality, you need an SMS-enabled phone number (Twilio number with SMS addon, approximately $20/month) [(2) ]() . Once enabled, you can trigger outbound SMS to customer phone numbers via the Retell API .
Retell allows you to build fully automated SMS and chatbot agents with no coding required using their visual flow builder [(1) ]() . You can also convert existing voice agents into SMS-compatible flows with one click .
**AI Evy
11/19/2025, 5:34 AMAI Evy
11/19/2025, 5:34 AMeclipsewaste
11/19/2025, 5:44 AMAI Evy
11/19/2025, 5:44 AMAI Evy
11/19/2025, 5:45 AMretell_llm_dynamic_variables parameter . This allows you to personalize the agent's behavior based on who's calling.
Here's an example when creating a phone call:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
}) ;
console.log(phoneCallResponse.agent_id) ;
[(2) ]()
You can add the retell_llm_dynamic_variables object to inject customer information:
javascript
{ "customer_name": "John Doe" }AI Evy
11/19/2025, 5:45 AMretell_llm_dynamic_variables when registering or creating the call
4. The agent can then reference this data during the conversation
This enables the agent to greet customers by name and access their account information throughout the interaction .AI Evy
11/19/2025, 5:50 AMAI Evy
11/19/2025, 5:50 AMeclipsewaste
11/19/2025, 5:54 AMAI Evy
11/19/2025, 5:54 AMAI Evy
11/19/2025, 5:55 AMcall_started, call_ended, and call_analyzed [(1) ]() . The documentation does not mention separate chat_started, chat_ended, or chat_analyzed event types.
For web chat and SMS interactions, Retell uses the same webhook event structure — the events are still named call_started, call_ended, and call_analyzed, regardless of whether the interaction happens via voice, SMS, or web chat .
To set up webhooks for your chat agent:
1. Register your webhook endpoint in the Retell dashboard [(2) ]()
2. Configure your endpoint to handle the three event types:
javascript
// install the sdk: <https://docs.retellai.com/get-started/sdk>
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Chat started event received", call.call_id) ;
break;
case "call_ended":
console.log("Chat ended event received", call.call_id) ;
break;
case "call_analyzed":
console.log("Chat analyzed event received", call.call_id) ;
break;
default:
console.log("Received an unknown event:", event) ;
}
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;AI Evy
11/19/2025, 5:55 AMAI Evy
11/19/2025, 5:55 AMAI Evy
11/19/2025, 5:55 AMAI Evy
11/19/2025, 6:13 AMeclipsewaste
11/19/2025, 6:13 AMAI Evy
11/19/2025, 6:13 AMjson
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}AI Evy
11/19/2025, 6:13 AMcall_started, call_ended, or call_analyzed webhooks [(1) ]() .
4. SMS Integration
Ensure you've completed the SMS integration setup as described in the Create Chat Completion guide [(4) ]() . Your number needs SMS capability enabled through Twilio or another supported provider.
**Key Point**: The webhook flow for SMS works like this:
1. SMS arrives → call_inbound webhook fires (if configured) [(3) ]()
2. You respond to allow processing
3. Chat session starts → call_started webhook fires [(1) ]()
4. Chat ends → call_ended webhook fires
5. Analysis completes → call_analyzed webhook fires
If you're not receiving any webhooks when texting, verify your phone number has both an inbound chat agent bound and an inbound webhook URL configured in the Retell dashboard [(3) ]() [(2) ]() .AI Evy
11/19/2025, 6:13 AMAI Evy
11/19/2025, 6:14 AM