POST /{PHONE_NUMBER_ID}/calls endpoint.action field to perform call operations:| Action | Description |
|---|---|
connect | Initiate an outbound call (business-initiated) |
pre_accept | Pre-accept an inbound call (establish media path early) |
accept | Accept an inbound call |
reject | Reject an inbound call |
terminate | Terminate an active call |
curl --location '/v1/whatsapp///calls' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"to": "919901258433",
"action": "connect",
"session": {
"sdp_type": "offer",
"sdp": "v=0\\r\\no=- 0 0 IN IP4 127.0.0.1\\r\\n..."
},
"biz_opaque_callback_data": "my-tracking-id"
}'{
"messaging_product": "whatsapp",
"calls": [
{
"id": "wacid.ABGGFjFVU2AfAgo6V"
}
]
}