robg6821
08/23/2025, 1:50 PMAI Evy
08/23/2025, 1:50 PMAI Evy
08/23/2025, 1:50 PMjavascript
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) ;AI Evy
08/23/2025, 1:50 PMfrom_number must be a phone number you own through Retell AI [(2) ]() . One user resolved their 404 error after realizing "It needed the from_number var to be a RetellAI phone number, which I hadn't given it" .
Another user found that properly configuring their phone number (in their case, a Telnyx number connected to Retell) resolved the 404 error [(1) ]() [(2) ]() .
Make sure:
1. Your from_number is actually a Retell AI phone number you own [(2) ]()
2. Your phone number is properly configured and connected to Retell [(1) ]()
3. Your Authorization header is correctly formatted as "Bearer YOUR_API_KEY" [(3) ]()
If you're still getting 404 errors after verifying your phone number configuration, you may want to check that your workspace has the proper API access enabled [(1) ]() .AI Evy
08/23/2025, 1:50 PMAI Evy
08/23/2025, 1:50 PMrobg6821
08/23/2025, 1:57 PMrobg6821
08/23/2025, 2:02 PMAI Evy
08/23/2025, 2:02 PMAI Evy
08/23/2025, 2:03 PMAI Evy
08/23/2025, 2:04 PM+1 (856) -331-5437 should be formatted as +18563315437 .
According to the documentation, the from_number must be "The number you own in E.164 format (+country code, then number with no space, no special characters) , used as the unique identifier for phone number APIs" .
Here's the correct format for your API request:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+18563315437',
to_number: '+12137774445',
}) ;
The E.164 format requirement applies to both the from_number and to_number fields . Make sure your phone number is also properly configured in your Retell dashboard and that it's a number you actually own through Retell [(2) ]() .AI Evy
08/23/2025, 2:04 PMrobg6821
08/23/2025, 2:12 PMAI Evy
08/23/2025, 2:12 PMAI Evy
08/23/2025, 2:13 PMfrom_number to be "The number you own in E.164 format. Must be a number purchased from Retell or imported to Retell" . The E.164 format means the country code followed by the number with no spaces, parentheses, or special characters .
Your corrected format (+18563315437 instead of +1 (856) -331-5437) now properly follows this requirement, which is why the API call is working successfully.
Thanks for confirming the solution - this will help other users who encounter the same formatting issue!AI Evy
08/23/2025, 2:13 PMAI Evy
08/23/2025, 2:13 PM