scott_90906
09/02/2025, 4:36 PMAI Evy
09/02/2025, 4:36 PMAI Evy
09/02/2025, 4:37 PMto_number and from_number parameters like phone calls [(1) ]() . Instead, you use the Create Chat API endpoint which requires different parameters .
To initiate an SMS conversation via API, you use the create-chat endpoint with these key parameters :
- agent_id (required) : The chat agent to use for the conversation
- agent_version (optional) : The version of the chat agent to use
- metadata (optional) : An arbitrary object for storage purposes
- retell_llm_dynamic_variables (optional) : Dynamic variables in key-value pairs that inject into your Response Engine prompt
The API returns a chat_id that you use for subsequent requests in the conversation [(1) ]() [(2) ]() .
For SMS functionality specifically, you need to enable SMS on your phone number through Retell's SMS addon [(3) ]() . Once enabled, you can trigger outbound SMS using SMS-capable Twilio numbers provisioned through Retell .
The chat creation process is separate from phone number configuration - you create the chat session first, then the SMS delivery happens through your configured SMS-enabled phone number [(2) ]() [(3) ]() .AI Evy
09/02/2025, 4:37 PMAI Evy
09/02/2025, 4:37 PMscott_90906
09/02/2025, 4:38 PMscott_90906
09/02/2025, 4:39 PMAI Evy
09/02/2025, 4:39 PMAI Evy
09/02/2025, 4:39 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.create({ agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD' }) ;
console.log(chatResponse.agent_id) ;
Based on community discussions, SMS functionality appears to be in beta testing and doesn't offer full API integration yet [(2) ]() . One community member mentioned needing to connect external APIs to allow Retell to handle SMS properly .
The sources don't provide specific information about how to specify the recipient's phone number when initiating SMS conversations via API. This appears to be a limitation or gap in the current SMS implementation.
I don't have sufficient information in the available sources to explain exactly how the agent determines who to send the SMS message to when initiating via API. You might want to check:
- [Create Chat]()
- [Create Phone Number]()
Would you like me to try to provide a general answer based on my knowledge instead?AI Evy
09/02/2025, 4:39 PMAI Evy
09/02/2025, 4:39 PM