Sparkls
05/04/2025, 1:19 PM{"message":["assistant.property assistantId should not exist","transport.audioFormat.an unknown value was passed to the validate function"],"error":"Bad Request","statusCode":400}%
With this request :
curl 'https://api.vapi.ai/call' \
-H 'authorization: Bearer MY_VALID_VAPI_PRIVATE_KEY' \
-H 'content-type: application/json' \
--data-raw '{
"assistant": { "assistantId": "MY_VALID_ASSISTANT_ID" },
"transport": {
"provider": "vapi.websocket",
"audioFormat": {
"format": "pcm_s16le",
"container": "raw",
"sampleRate": 16000
}
}
}'
I'm aiming to do that in my server backend now, since for my client frontend I am absolutely stuck not being able to overcome a bug for which Vapi did not follow up.
post about it :
https://discord.com/channels/1211482211119796234/1361269676075647047
_
now, regarding the websocket error I'm getting, am I misunderstanding something or? I'm litterally following the doc to the letter.
Thanks in advance.Vapi Support Bot
05/04/2025, 1:20 PMassistantId inside an assistant object, but it should be at the top level instead:
json
{
"assistantId": "MY_VALID_ASSISTANT_ID",
"transport": {
"provider": "vapi.websocket",
"audioFormat": {
"format": "pcm_s16le",
"container": "raw",
"sampleRate": 16000
}
}
}
This should resolve the first error according to Vapi's validation requirements.
Source:
- [Discord discussion about assistantId error](https://discord.com/channels/1211482211119796234/1336765707760963676)Kings_big💫
05/04/2025, 4:38 PM