Call action (connect / pre_accept / accept / reject / terminate)
Perform a WhatsApp Calling action (beta).
Proxies upstream POST /calling/calls. Despite the historical path
name /initiateCall, this endpoint handles all call actions:
| action | Use | Required |
|---|---|---|
connect | Outbound business → user | to + session (sdp_type: offer) |
pre_accept | Inbound (optional, reduces audio clipping) | call_id + session (sdp_type: answer) |
accept | Inbound answer | call_id + session (sdp_type: answer) |
reject | Decline inbound | call_id |
terminate | Hang up | call_id |
SDP / media (critical)
accept/pre_acceptrequire a WebRTC-generated SDP answer.- Do not send Meta's offer SDP back as the answer.
- Postman (or curl) alone cannot establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling.
Answer within ~30–60 seconds of an inbound connect webhook or Meta
terminates as unanswered. Common Meta errors include Calling not enabled
(138000), no permission (138006), SDP validation failures.
Outbound requires a prior Call Permission Request (CPR) acceptance. See the Calling tag overview for the full outbound flow and CPR limits.
Trial / subscriptionBlocked → 403 plain text.
Upstream failures often return HTTP 200 with { "response": { "error": "..." } }.
JWT tokentoken<token>application/json- body
Call action payload for POST /initiateCall (proxies upstream POST /calling/calls).
Despite the path name, this endpoint handles all call actions — not only outbound connect.
Required fields by action
| action | Required | session |
|---|---|---|
connect (outbound) | messaging_product, to, action | sdp_type: offer + business WebRTC SDP |
pre_accept | messaging_product, call_id, action | sdp_type: answer (WebRTC-generated) |
accept | messaging_product, call_id, action | sdp_type: answer (WebRTC-generated) |
reject | messaging_product, call_id, action | none |
terminate | messaging_product, call_id, action | none |
Critical: For pre_accept / accept, session.sdp must be a
WebRTC-generated SDP answer. Do not echo Meta's offer SDP back.
Postman alone cannot establish real media — you need a WebRTC (or SIP) stack.
messaging_product*"whatsapp"Must be whatsapp
"whatsapp"action*stringCall control action
"connect""pre_accept""accept""reject""terminate"call_id?stringWhatsApp call id from the inbound/outbound calls webhook (calls[].id).
Required for pre_accept, accept, reject, terminate.
to?stringRecipient WhatsApp user phone (digits, country code, no +).
Required for outbound connect.
biz_opaque_callback_data?stringOptional opaque string echoed on later call webhooks for correlation
length <= 512session?WebRTC SDP session (required for connect / pre_accept / accept)
[key: string]?anyCall action result from upstream, or legacy error wrapper
application/json- response
Successful call action response from upstream, returned as-is.
On empty upstream body, 1msg may return { "result": "success" }.
Upstream failures are often wrapped as HTTP 200 { "response": { "error": "..." } }.
messaging_product?stringsuccess?booleancalls?array<>Present on outbound connect — contains the new call id
result?stringLegacy success marker when upstream returns an empty body
response?Present when 1msg wraps an upstream error
[key: string]?anycurl -X POST 'https://api.1msg.io/123/initiateCall' \ -H 'Content-Type: application/json' \ -d '{ "messaging_product": "whatsapp", "to": "12185552828", "action": "connect", "biz_opaque_callback_data": "order-123", "session": { "sdp_type": "offer", "sdp": "[REPLACE_WITH_WEBRTC_SDP]" }}'{ "messaging_product": "whatsapp", "success": true}