https://retellai.com/?utm_source=discord&utm_medium=seo logo
v
@AI Evy it says api.retell.com:443 during outbound sms sent at 1am
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer When you see
api.retell.com:443
during outbound SMS operations, this is the standard Retell API endpoint using port 443 (HTTPS) . This is the expected behavior when making outbound SMS calls through the Retell API [(1) ]() . To create an outbound SMS chat, you use the
/create-sms-chat
endpoint with your phone numbers in E.164 format :
Copy code
javascript
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) ;
Common SMS issues to check: - Verify your phone number has SMS capability and is properly configured with both inbound and outbound SMS agents [(2) ]() [(3) ]() - Ensure your number is registered for A2P messaging with your SMS provider (Twilio or custom telephony) [(4) ]() [(5) ]() - Confirm your phone numbers are in valid E.164 format (
+1XXXXXXXXXX
for US numbers) [(1) ]() - Check that SMS is enabled in your telephony provider's advanced add-ons [(4) ]() If you're experiencing errors, please share the specific error message or response code you're receiving for more targeted troubleshooting.
​ To learn more, see the sources I considered: [[1] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) [[2] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) [[3] List Phone Numbers](https://docs.retellai.com/api-references/list-phone-numbers) [[4] Chat Agents not sending out texts to Twillio](https://discord.com/channels/1186424376300679209/1463233659208339668) [[5] SMS is not sent.](https://discord.com/channels/1186424376300679209/1460659178120024096) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
v
@AI Evy Http request failed as there is an error: 'The server returned status code '504' when status code '101' was expected. (api.retellai.com:443)'.
a
Thanks for the follow-up, @Vyyy. I'll get back to you soon.
### Answer The HTTP 504 error (Gateway Timeout) when expecting status code 101 (Switching Protocols) suggests a WebSocket connection issue during your outbound SMS operation. Status code 101 is used when upgrading an HTTP connection to WebSocket, which Retell uses for real-time communication. Immediate troubleshooting steps: 1. Check Retell's service status - A 504 error at 1am could indicate temporary service issues or maintenance 2. Verify your API implementation - Ensure you're using the correct endpoint format for outbound SMS [(1) ]() 3. Review authentication - Confirm your API key is valid and properly formatted as "Bearer YOUR_API_KEY" 4. Check timeout settings - If you're using custom timeout configurations, they may be too aggressive for the WebSocket upgrade For outbound SMS, the correct API structure is:
Copy code
javascript
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',
}) ;
Additional considerations: - Ensure both
from_number
and
to_number
are in E.164 format - Verify your phone number has SMS capability enabled [(2) ]() - Check that your telephony provider (Twilio, etc.) isn't experiencing issues If the error persists, contact Retell support with the exact timestamp, phone numbers involved, and the full error response for investigation.
​ To learn more, see the sources I considered: [[1] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) [[2] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.