Do we have a websocket connection for Vapi's Workf...
# support
a
I really liked Vapi's Workflow, but I'm trying to use the workflow WebSocket connection for my use case and haven't been able to find how to do that.
v
Vapi supports WebSocket transport for real-time, bidirectional audio calls, but the documentation does not confirm direct WebSocket integration for triggering or managing Workflows. To initiate a WebSocket call, use the following cURL example:
Copy code
bash
curl 'https://api.vapi.ai/call' \
  -H 'authorization: Bearer YOUR_API_KEY' \
  -H 'content-type: application/json' \
  --data-raw '{
    "assistant": { "assistantId": "YOUR_ASSISTANT_ID" },
    "transport": {
      "provider": "vapi.websocket",
      "audioFormat": {
        "format": "pcm_s16le",
        "container": "raw",
        "sampleRate": 16000
      }
    }
  }'
At this time, there is no explicit documentation on connecting directly to a Workflow via WebSocket. You may need to trigger workflows through standard call flows or reach out to Vapi support for the latest capabilities. Source: - [WebSocket Transport Documentation](https://docs.vapi.ai/calls/websocket-transport)
a
Marking this as resolved. We just need to modify cURL as
Copy code
curl 'https://api.vapi.ai/call' \
  -H 'authorization: Bearer YOUR_API_KEY' \
  -H 'content-type: application/json' \
  --data-raw '{
    "workflowId": "YOUR_ASSISTANT_ID",
    "transport": {
      "provider": "vapi.websocket",
      "audioFormat": {
        "format": "pcm_s16le",
        "container": "raw",
        "sampleRate": 16000
      }
    }
  }'
v
Marking this ticket as Solved ✅