https://retellai.com/?utm_source=discord&utm_medium=seo logo
I am just starting to read retell's api documentat...
# 💬・general
k
@AI Evy I am just starting to read retell's api documentation. Using the docs at https://docs.retellai.com/api-references/create-phone-call, I try making the curl call but keep getting a 404 not found error. Help please?
a
Thanks for tagging me @kamalchd. I'll look through relevant sources and get back to you shortly.
### Answer The 404 error typically occurs due to a few common issues. Based on the Create Phone Call documentation [(1) ]() , here's what to check: 1. Verify the endpoint URL The correct endpoint is: `POST 2. Check your authentication Make sure your Authorization header is properly formatted :
Copy code
Authorization: Bearer YOUR_RETELL_API_KEY
3. Ensure proper phone number format Both
from_number
and
to_number
must be in E.164 format . The
from_number
must be a number purchased from Retell or imported to Retell . 4. Verify required parameters The API requires these mandatory fields : -
from_number
(string, required) -
to_number
(string, required) Here's the correct JavaScript example from the documentation :
Copy code
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) ;
Common issue: 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" [(2) ]() . Make sure your
from_number
is actually a Retell AI phone number you own. Another user found that properly configuring their phone number (in their case, a Telnyx number connected to Retell) resolved the 404 error [(3) ]() .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Getting a 404 error when trying to use create-phone-call through HTTP in make.com](https://discord.com/channels/1186424376300679209/1370700007765704785) [[3] V2 create-phone-call endpoint returns 404 Not Found — API Access?](https://discord.com/channels/1186424376300679209/1384549347605221438) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the feedback, glad I was helpful.