API Reference
Calls API
Initiate and manage WhatsApp Business voice calls programmatically via Vobiz - WebRTC-based signaling for inbound, outbound, and call state management over the internet.
POST
Calls API
WhatsApp Business Calling runs over WhatsApp’s WebRTC infrastructure, not the PSTN. The recipient’s device must support WhatsApp voice calls and be connected to the internet.
https://api.vobiz.ai/api/v1/messaging
Authentication: Every request requires X-Auth-ID: MA_XXXXXXXX and X-Auth-Token: <token> headers (a Bearer JWT is also accepted). Set Content-Type: application/json on requests with a body. Get your credentials from console.vobiz.ai.
Endpoints overview
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/messaging/calls/whatsapp | Initiate a WhatsApp call |
POST | /api/v1/messaging/calls/whatsapp/action | Manage a call (pre-accept/accept/reject/terminate) |
GET | /api/v1/messaging/calls/whatsapp/logs | List call history |
Initiate a WhatsApp call
This endpoint does not return an
sdp_answer. The SDP answer from the recipient’s device arrives asynchronously via the call webhook / WebSocket event once the call is answered.Request body
| Field | Required | Description |
|---|---|---|
channel_id | Yes | Channel (UUID) to call from |
to | Yes | Recipient phone number (E.164, e.g. +919876543210) |
sdp_offer | Yes | WebRTC SDP offer string |
cURL
201 Created
Manage call (actions)
channel_id, the call_id, and one of the four actions. For accept and pre_accept, include the WebRTC SDP answer in the sdp field.
Request body
| Field | Required | Description |
|---|---|---|
channel_id | Yes | Channel (UUID) the call belongs to |
call_id | Yes | Call identifier |
action | Yes | pre_accept, accept, reject, or terminate |
sdp | Conditional | WebRTC SDP answer. Required for accept and pre_accept |
| Action | Description |
|---|---|
pre_accept | Signal call preview before full accept (send SDP answer) |
accept | Accept an incoming call (send SDP answer) |
reject | Reject an incoming call |
terminate | End an active connected call |
200 OK
List call logs
direction and status.
| Query param | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 25 | Page size |
direction | — | inbound or outbound |
status | — | Filter by call status |
cURL
200 OK
Call log object
| Field | Type | Description |
|---|---|---|
id | UUID | Call log ID |
account_id | string | Owning account (MA_XXXXXXXX) |
channel_id | UUID | Channel the call belongs to |
meta_call_id | string | Meta’s call identifier |
direction | string | inbound or outbound |
from_number | string | Caller number (E.164) |
to_number | string | Callee number (E.164) |
status | string | initiated, ringing, pre_accepted, accepted, rejected, terminated, failed, or missed |
call_type | string | Call type |
offer_sdp | string | WebRTC SDP offer |
answer_sdp | string | WebRTC SDP answer |
ice_candidates | object | ICE candidate data |
started_at | RFC3339 | Call start (UTC) |
answered_at | RFC3339 | Call answered (UTC) |
ended_at | RFC3339 | Call ended (UTC) |
duration_seconds | int | Call duration in seconds |
hangup_cause | string | Reason the call ended |
metadata | object | Additional call metadata |
created_at | RFC3339 | Creation timestamp (UTC) |
updated_at | RFC3339 | Last update timestamp (UTC) |