Unable to Create a call using api
# support
r
Whenever I try to create a call out using Vapi API, I get this error: { "message": [ "customers.0.number must be a valid phone number in the E.164 format. Hot tip, you may be missing the country code (Eg. US: +1)." ], "error": "Bad Request", "statusCode": 400 } The phone number is in the correct format.
v
Try this example payload to ensure your phone number is in the correct E.164 format and the structure matches Vapi's requirements:
Copy code
json
{
  "customers": [
    {
      "number": "+12345678900"
    }
  ],
  "assistantId": "your-assistant-id",
  "phoneNumberId": "your-phone-id"
}
Make sure there are no spaces, the "+" is present, and the country code is correct. Even a small typo or extra character can cause this error. [See Vapi API docs for details](https://docs.vapi.ai/api-reference/calls/create) Sources: - [Vapi API Reference: Create Call](https://docs.vapi.ai/api-reference/calls/create) - [Vapi Dynamic Variables Guide](https://docs.vapi.ai/assistants/dynamic-variables#prepare-your-request)
r
i did confirm this but still not working
k
Hey, can you share the call request? By the way, our customer property is not of type array, it's of type record. So you have to pass them as in JSON and set the number E164 check property to false to make it work.
r
here is the call request: { "assistantId": "85747a5d-3111-4e00-8d27-3b380281772c", "phoneNumberId": "{{$json.phoneNumberId}},", "customer": { "name": "{{ $json.name }}", "number": "{{ $json.phone }}" } } going from n8n to vapi to make the call https://cdn.discordapp.com/attachments/1374810524130480168/1375084009071050813/image.png?ex=68306647&is=682f14c7&hm=5b5a940c893fe2fb97d9eff47503447a9a989b914f33aa964e73b7a58a229270& https://cdn.discordapp.com/attachments/1374810524130480168/1375084009406857216/image.png?ex=68306647&is=682f14c7&hm=2ecdf3588d2c65a810436554deb4969d4bbd13a04b12382e4be16ac9b5177b04&
k
Here's the solution: curl -X POST \\ \-H "Authorization: Bearer YOUR_API_KEY" \\ \-H "Content-Type: application/json" \\ \-d '{ "customers": \[{ "name": "YOUR_CUSTOMER_NAME", "number": "YOUR_PHONE_NUMBER", "numberE164CheckEnabled": false }\], "assistantId": "YOUR_ASSISTANT_ID", "phoneNumberId": "YOUR_PHONE_NUMBER_ID" }' \### What to replace: \- `YOUR_API_KEY`: Your Vapi API key \- `YOUR_CUSTOMER_NAME`: Customer name (e.g., "Test Call") \- `YOUR_PHONE_NUMBER`: The phone number that was failing validation \- `YOUR_ASSISTANT_ID`: Your Vapi assistant ID \- `YOUR_PHONE_NUMBER_ID`: Your Vapi phone number ID \### What I fixed: I added the
numberE164CheckEnabled: false
parameter to the customer object, which disables the strict E.164 validation while still ensuring basic validation rules. This will allow your call to go through even if your phone number doesn't strictly conform to E.164 format or uses test numbers.
r
it doesn't work. even when doing a test in the api reference page of docs.vapi.ai, i get a response of: { "message": "Failed to create calls for the following customers: +13155294769", "error": "Bad Request", "statusCode": 400 } for any phone number i try to use & assistantId & phonenumberId
v
Try this corrected payload structure for your API call:
Copy code
json
{
  "customers": [
    {
      "name": "Test Call",
      "number": "+13155294769",
      "numberE164CheckEnabled": false
    }
  ],
  "assistantId": "YOUR_ASSISTANT_ID",
  "phoneNumberId": "YOUR_PHONE_NUMBER_ID"
}
Make sure you use the
customers
array (not
customer
), and include
numberE164CheckEnabled: false
if you're testing with non-standard numbers. Double-check that your assistant and phone number IDs are valid and active in your Vapi dashboard.
[See Vapi API Reference: Create Call](https://docs.vapi.ai/api-reference/calls/create) Source: - [Vapi API Reference: Create Call](https://docs.vapi.ai/api-reference/calls/create)
To help diagnose this further, could you please provide the exact resolved values for
assistantId
,
phoneNumberId
, and the phone number being sent in your API request (with any sensitive info redacted)?
This will help determine if there are any formatting or data issues that might not be visible in the templated payload. Sources: - [Vapi API Reference: Create Call](https://docs.vapi.ai/api-reference/calls/create) - [Vapi Dynamic Variables Guide](https://docs.vapi.ai/assistants/dynamic-variables#prepare-your-request) - [Outbound Sales Example](https://docs.vapi.ai/examples/outbound-sales)
k
Hey, sorry to hear about the issue with your account. Could you please record a loom video showing the error or behavior you're experiencing? It would really help us understand the problem better.
r
here is the recording: https://somup.com/cThvbtMPI2
did that make sense?
k
Yes, it does. Just remove the num164 check and the name property from the API request and it will work properly.
r
still getting the same error: { "message": "Failed to create calls for the following customers: +13155294769", "error": "Bad Request", "statusCode": 400 }
Here is the request being sent: curl -X POST https://api.vapi.ai/call \ -H "Authorization: Bearer ad5a19d5-ba7a-42a9-a807-83cae89635ab" \ -H "Content-Type: application/json" \ -d '{ "customers": [ { "number": "+13155294769" } ], "assistantId": "85747a5d-3111-4e00-8d27-3b380281772c", "phoneNumberId": "1228c413-da84-4752-984a-b4613c2e8c57" }'
any ideas?
k
Copy code
curl -X POST https://api.vapi.ai/call \
  -H "Authorization: Bearer xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "customer": {
      "number": "+13155294769",
       "numberE164CheckEnabled": false
    },
    "assistantId": "85747a5d-3111-4e00-8d27-3b380281772c",
    "phoneNumberId": "1228c413-da84-4752-984a-b4613c2e8c57"
  }'
Try this curl request and let me know how it goes for you.
r
ok that worked but now im getting this: { "errorMessage": "Bad request - please check your parameters [item 14]", "errorDescription": "Bad Request", "errorDetails": { "rawErrorMessage": [ "400 - \"{\\\"message\\\":\\\"Over Concurrency Limit.\\\",\\\"error\\\":\\\"Bad Request\\\",\\\"statusCode\\\":400}\"" ], "httpCode": "400" }, "n8nDetails": { "nodeName": "HTTP Request", "nodeType": "n8n-nodes-base.httpRequest", "nodeVersion": 4.2, "itemIndex": 14, "time": "6/6/2025, 2:11:45 PM", "n8nVersion": "1.84.3 (Cloud)", "binaryDataMode": "filesystem", "stackTrace": [ "NodeApiError: Bad request - please check your parameters", " at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:525:33)", " at processTicksAndRejections (node:internal/process/task_queues:95:5)", " at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:681:27)", " at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:913:51", " at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/workflow-execute.js:1246:20" ] } }
k
Hey, can you share the org_id? You can find it [here](https://dashboard.vapi.ai/org/settings). This will help me get more details about it.