Bad Request: id must be a valid UUID
# support
a
i am new to VAPI and configured the
/call
api. It keeps giving me this error:
{"message":["id must be a valid UUID."],"error":"Bad Request","statusCode":400}
My payload is quite simple. Just assisstnatId, phoneNumberId taken from dashboard as in sample:
Copy code
{
  "assistantId": "d0c14a7c-xxxx-yyyy-zzzz-012345678910",
  "phoneNumberId": "8f934aba-xxxx-yyyy-zzzz-012345678910",
  "customer": {
    "number": "+1xxxxxxx"
  },
  "schedulePlan": {
    "earliestAt": "2025-12-31T17:5:00-05:00"
  }
}
Uisng phone number by twilio, added from dashboard.. would Appreciate the help!
v
The error is caused by an invalid UUID format for
assistantId
or
phoneNumberId
.
Make sure both IDs are 36-character strings in the format:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
(only hexadecimal digits and hyphens). Example:
Copy code
json
{
  "assistantId": "d0c14a7c-1234-5678-abcd-012345678910",
  "phoneNumberId": "8f934aba-4321-8765-dcba-109876543210",
  "customer": { "number": "+1xxxxxxxxxx" },
  "schedulePlan": { "earliestAt": "2025-12-31T17:05:00-05:00" }
}
Double-check your IDs in the dashboard and update your payload accordingly. For more, see the [debugging guide](https://docs.vapi.ai/debugging). Source: - [Debugging voice agents](https://docs.vapi.ai/debugging)
a
@Vapi Support Bot , i just added string above as sample. I am using the one rechecked from dashboard. Its not mentioning which id is problematic. Even if i remove phoneNumberId or assisstantId keys 🙂
v
Try explicitly validating your
assistantId
and
phoneNumberId
in your code before sending the request—both must be 36-character UUIDs (hexadecimal and hyphens only). Here’s a quick check in JavaScript:
Copy code
js
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
console.log(uuidRegex.test(assistantId), uuidRegex.test(phoneNumberId));
If either returns
false
, double-check the IDs copied from the dashboard. For more, see the [phone calling documentation](https://docs.vapi.ai/phone-calling). Source: - [Phone Calling](https://docs.vapi.ai/phone-calling)
c
Hi Resonance Aco, Thanks — that 400 comes from a UUID validation failure. Check these quickly: 1. Validate both IDs locally with the regex you already have:
Copy code
js
   const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
   console.log('assistantId', uuidRegex.test(assistantId));
   console.log('phoneNumberId', uuidRegex.test(phoneNumberId));
2. Common issues to fix: - Invisible characters or quotes copied from UI (trim whitespace). - Replaced characters like “x” placeholders — ensure you’re using the actual dashboard UUIDs. - Lower/upper case is fine, but non-hex chars (g, z, etc.) will fail. 3. If UUIDs validate true but error persists: - Confirm the ID actually exists in your org (dashboard list). - Make sure you’re sending the IDs in the correct fields (assistantId, phoneNumberId) and not nesting them incorrectly. 4. Quick payload checklist: - ISO datetime format: ensure minutes are two digits (e.g., "17:05:00-05:00"). - Customer number must be valid per CreateCustomerDTO (E.164 unless you disabled check).