Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Project API key for authentication. This is the recommended authentication method.

Get your API key from the Kapso dashboard under Integrations > API keys.

Path Parameters

phone_number_id
string
required

WhatsApp Business Phone Number ID

Body

application/json
messaging_product
enum<string>
required
Available options:
whatsapp
Example:

"whatsapp"

action
enum<string>
required

The action to perform

Available options:
connect,
pre_accept,
accept,
reject,
terminate
Example:

"accept"

to
string

Recipient WhatsApp ID (required for connect action)

Example:

"15551234567"

call_id
string

Call ID (required for pre_accept, accept, reject, terminate)

Example:

"wacid.ABGGFjFVU2AfAgo6V-Hc5eCgK5Gh"

session
object

WebRTC session description (required for connect, pre_accept, accept)

biz_opaque_callback_data
string

Arbitrary tracking string (max 512 chars, optional for connect/accept)

Maximum string length: 512
Example:

"tracking_id_12345"

Response

Action performed successfully

messaging_product
enum<string>
Available options:
whatsapp
Example:

"whatsapp"

success
boolean
Example:

true

calls
object[]

Returned for connect action