1MSG

Call action (connect / pre_accept / accept / reject / terminate)

POST
/initiateCall

Perform a WhatsApp Calling action (beta).

Proxies upstream POST /calling/calls. Despite the historical path name /initiateCall, this endpoint handles all call actions:

actionUseRequired
connectOutbound business → userto + session (sdp_type: offer)
pre_acceptInbound (optional, reduces audio clipping)call_id + session (sdp_type: answer)
acceptInbound answercall_id + session (sdp_type: answer)
rejectDecline inboundcall_id
terminateHang upcall_id

SDP / media (critical)

  • accept / pre_accept require 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": "..." } }.

Authorization

JWT token
querytoken<token>

Request Body

application/json
  1. 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

actionRequiredsession
connect (outbound)messaging_product, to, actionsdp_type: offer + business WebRTC SDP
pre_acceptmessaging_product, call_id, actionsdp_type: answer (WebRTC-generated)
acceptmessaging_product, call_id, actionsdp_type: answer (WebRTC-generated)
rejectmessaging_product, call_id, actionnone
terminatemessaging_product, call_id, actionnone

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

Value in"whatsapp"
action*string

Call control action

Value in"connect""pre_accept""accept""reject""terminate"
call_id?string

WhatsApp call id from the inbound/outbound calls webhook (calls[].id). Required for pre_accept, accept, reject, terminate.

to?string

Recipient WhatsApp user phone (digits, country code, no +). Required for outbound connect.

biz_opaque_callback_data?string

Optional opaque string echoed on later call webhooks for correlation

Lengthlength <= 512
session?

WebRTC SDP session (required for connect / pre_accept / accept)

[key: string]?any

Response Body

Call action result from upstream, or legacy error wrapper

application/json
  1. 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?string
success?boolean
calls?array<>

Present on outbound connect — contains the new call id

result?string

Legacy success marker when upstream returns an empty body

response?

Present when 1msg wraps an upstream error

[key: string]?any
curl -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}