Skip to main content
POST
/
api
/
v1
/
messaging
/
calls
/
whatsapp
Calls API
curl --request POST \
  --url https://api.vobiz.ai/api/v1/messaging/calls/whatsapp
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.
Base URL: 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

MethodEndpointDescription
POST/api/v1/messaging/calls/whatsappInitiate a WhatsApp call
POST/api/v1/messaging/calls/whatsapp/actionManage a call (pre-accept/accept/reject/terminate)
GET/api/v1/messaging/calls/whatsapp/logsList call history

Initiate a WhatsApp call

POST https://api.vobiz.ai/api/v1/messaging/calls/whatsapp
Initiate an outbound WhatsApp voice call. Provide a WebRTC SDP offer.
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

FieldRequiredDescription
channel_idYesChannel (UUID) to call from
toYesRecipient phone number (E.164, e.g. +919876543210)
sdp_offerYesWebRTC SDP offer string
cURL
curl -X POST \
  "https://api.vobiz.ai/api/v1/messaging/calls/whatsapp" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
    "to": "+919876543210",
    "sdp_offer": "v=0\r\no=- 0 0 IN IP4 0.0.0.0\r\n..."
  }'
201 Created
{
  "call_id": "d5e6f708-1920-4a3b-94c5-d6e7f8091022",
  "from": "+911140001234",
  "to": "+919876543210",
  "status": "initiated",
  "direction": "outbound"
}

Manage call (actions)

POST https://api.vobiz.ai/api/v1/messaging/calls/whatsapp/action
Control an active or incoming call. Pass the 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

FieldRequiredDescription
channel_idYesChannel (UUID) the call belongs to
call_idYesCall identifier
actionYespre_accept, accept, reject, or terminate
sdpConditionalWebRTC SDP answer. Required for accept and pre_accept
ActionDescription
pre_acceptSignal call preview before full accept (send SDP answer)
acceptAccept an incoming call (send SDP answer)
rejectReject an incoming call
terminateEnd an active connected call
curl -X POST \
  "https://api.vobiz.ai/api/v1/messaging/calls/whatsapp/action" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
    "call_id": "d5e6f708-1920-4a3b-94c5-d6e7f8091022",
    "action": "accept",
    "sdp": "v=0\r\no=- 0 0 IN IP4 0.0.0.0\r\n..."
  }'
200 OK
{
  "call_id": "d5e6f708-1920-4a3b-94c5-d6e7f8091022",
  "action": "accept",
  "success": true
}

List call logs

GET https://api.vobiz.ai/api/v1/messaging/calls/whatsapp/logs
Returns a paginated history of WhatsApp calls - inbound and outbound - with duration, outcome, and participant details. Filter with direction and status.
Query paramDefaultDescription
page1Page number
limit25Page size
directioninbound or outbound
statusFilter by call status
cURL
curl -X GET \
  "https://api.vobiz.ai/api/v1/messaging/calls/whatsapp/logs?page=1&limit=25&direction=outbound&status=accepted" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: {auth_token}"
200 OK
{
  "items": [
    {
      "id": "e6f70819-2031-4b4c-95d6-e7f809102233",
      "account_id": "MA_XXXXXXXX",
      "channel_id": "3f1c9b7e-2d4a-4f6b-9c8e-0a1b2c3d4e5f",
      "meta_call_id": "wacid.HBgM...",
      "direction": "outbound",
      "from_number": "+911140001234",
      "to_number": "+919876543210",
      "status": "accepted",
      "call_type": "voice",
      "duration_seconds": 185,
      "started_at": "2026-03-25T14:00:00Z",
      "answered_at": "2026-03-25T14:00:04Z",
      "ended_at": "2026-03-25T14:03:05Z",
      "created_at": "2026-03-25T14:00:00Z",
      "updated_at": "2026-03-25T14:03:05Z"
    }
  ],
  "total": 12,
  "page": 1,
  "limit": 25,
  "has_more": false
}

Call log object

FieldTypeDescription
idUUIDCall log ID
account_idstringOwning account (MA_XXXXXXXX)
channel_idUUIDChannel the call belongs to
meta_call_idstringMeta’s call identifier
directionstringinbound or outbound
from_numberstringCaller number (E.164)
to_numberstringCallee number (E.164)
statusstringinitiated, ringing, pre_accepted, accepted, rejected, terminated, failed, or missed
call_typestringCall type
offer_sdpstringWebRTC SDP offer
answer_sdpstringWebRTC SDP answer
ice_candidatesobjectICE candidate data
started_atRFC3339Call start (UTC)
answered_atRFC3339Call answered (UTC)
ended_atRFC3339Call ended (UTC)
duration_secondsintCall duration in seconds
hangup_causestringReason the call ended
metadataobjectAdditional call metadata
created_atRFC3339Creation timestamp (UTC)
updated_atRFC3339Last update timestamp (UTC)