Calls API
Initiate and manage WhatsApp voice calls programmatically using WebRTC-based signaling.
Note: WhatsApp calling requires the recipient's device to support WhatsApp voice calls and be connected to the internet. Calls go through WhatsApp's peer-to-peer infrastructure, not the PSTN.
Overview
| Method | Endpoint | Description |
|---|---|---|
| POST | https://api.vobiz.ai/v1/messaging/calls/whatsapp | Initiate a WhatsApp call |
| POST | https://api.vobiz.ai/v1/messaging/calls/whatsapp/action | Manage call (accept/reject/terminate) |
| GET | https://api.vobiz.ai/v1/messaging/calls/whatsapp/logs | List call history |
Initiate WhatsApp Call
POST
https://api.vobiz.ai/v1/messaging/calls/whatsappInitiates a WhatsApp voice call. Provide a WebRTC SDP offer — Vobiz returns the SDP answer from the recipient's device once they accept.
| Field | Required | Description |
|---|---|---|
| channel_id | Required | Channel to call from |
| to | Required | Recipient phone number (E.164) |
| sdp_offer | Required | WebRTC SDP offer string |
Authentication Required:
- • X-Auth-ID: Your Account Auth ID
- • X-Auth-Token: Your Account Auth Token
- • Accept: application/json
cURL
curl -X POST \
"https://api.vobiz.ai/v1/messaging/calls/whatsapp" \
-H "X-Auth-ID: {auth_id}" \
-H "X-Auth-Token: {auth_token}" \
-H "Content-Type: application/json" \
-d '{"channel_id":"{channel_id}","to":"{to}","sdp_offer":"v=0\r\no=- 0 0 IN IP4 0.0.0.0\r\n..."}'Response — 200 OK
{"call_id":"call_abc123","status":"initiated","sdp_answer":"v=0\r\n...","created_at":"2026-03-25T14:00:00Z"}Manage Call (Actions)
POST
https://api.vobiz.ai/v1/messaging/calls/whatsapp/actionControl an active or incoming call. Pass the call_id and one of the four actions: pre_accept, accept, reject, terminate.
Authentication Required:
- • X-Auth-ID: Your Account Auth ID
- • X-Auth-Token: Your Account Auth Token
- • Accept: application/json
pre_accept
Signal call preview before full accept
accept
Accept an incoming call
reject
Reject an incoming call
terminate
End an active connected call
cURL — Terminate a call
curl -X POST \
"https://api.vobiz.ai/v1/messaging/calls/whatsapp/action" \
-H "X-Auth-ID: {auth_id}" \
-H "X-Auth-Token: {auth_token}" \
-H "Content-Type: application/json" \
-d '{"call_id":"{call_id}","action":"terminate"}'cURL — Accept an incoming call
curl -X POST \
"https://api.vobiz.ai/v1/messaging/calls/whatsapp/action" \
-H "X-Auth-ID: {auth_id}" \
-H "X-Auth-Token: {auth_token}" \
-H "Content-Type: application/json" \
-d '{"call_id":"{call_id}","action":"accept"}'List Call Logs
GET
https://api.vobiz.ai/v1/messaging/calls/whatsapp/logsReturns a paginated history of all WhatsApp calls — inbound and outbound — with duration, outcome, and participant details.
Authentication Required:
- • X-Auth-ID: Your Account Auth ID
- • X-Auth-Token: Your Account Auth Token
- • Accept: application/json
cURL
curl -X GET \
"https://api.vobiz.ai/v1/messaging/calls/whatsapp/logs?page=1&limit=25" \
-H "X-Auth-ID: {auth_id}" \
-H "X-Auth-Token: {auth_token}"Response — 200 OK
{
"data": [{"call_id":"call_abc123","direction":"outbound","to":"+919876543210","status":"completed","duration_seconds":185,"started_at":"2026-03-25T14:00:00Z","ended_at":"2026-03-25T14:03:05Z"}],
"meta": {"total":12,"page":1}
}Last updated: April 2026Edit this page