Rudra
06/08/2025, 3:44 PMVapi Support Bot
06/08/2025, 3:48 PMassistantId at the root level, not inside an assistant object.
Try this corrected format:
bash
curl 'https://api.vapi.ai/call' \
-H 'authorization: Bearer YOUR_API_KEY' \
-H 'content-type: application/json' \
--data-raw '{
"assistantId": "YOUR_ASSISTANT_ID",
"transport": {
"provider": "vapi.websocket",
"audioFormat": {
"format": "pcm_s16le",
"container": "raw",
"sampleRate": 16000
}
}
}'
Replace YOUR_API_KEY and YOUR_ASSISTANT_ID with your actual values. This should resolve the error and generate the WebSocket URL as expected.
Reference: [Vapi WebSocket Transport Docs](https://docs.vapi.ai/calls/websocket-transport)
Source:
- [Vapi WebSocket Transport Docs](https://docs.vapi.ai/calls/websocket-transport)Vapi Support Bot
06/08/2025, 6:07 PMRudra
06/08/2025, 6:07 PMVapi Support Bot
06/09/2025, 3:53 AM