Skip to main content
POST
/
{phone_number_id}
/
marketing_messages
Send a marketing message
curl --request POST \
  --url https://api.kapso.ai/meta/whatsapp/v24.0/{phone_number_id}/marketing_messages \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "recipient": "US.13491208655302741918",
  "type": "template",
  "template": {
    "name": "promo_template",
    "language": {
      "code": "en_US"
    }
  }
}
'
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "US.13491208655302741918",
      "user_id": "US.13491208655302741918"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgNMTU1NTE0OTU5Nzg1FQIAERgSMDhGRjdCMDEyOTcxQzFFQkFBAA==",
      "message_status": "accepted"
    }
  ]
}

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

Always "whatsapp"

Available options:
whatsapp
Example:

"whatsapp"

to
string
required

Recipient phone number. Use recipient for BSUID sends.

Example:

"15551234567"

type
enum<string>
required

Marketing messages must use a WhatsApp template.

Available options:
template
Example:

"template"

template
object
required
recipient_type
enum<string>
default:individual

Marketing messages are sent to individual recipients.

Available options:
individual
biz_opaque_callback_data
string

Arbitrary string for tracking (echoed in webhooks)

Maximum string length: 512
recipient
string

Recipient BSUID or parent BSUID. If to is also present, the phone number in to takes precedence.

Example:

"US.13491208655302741918"

Response

Message accepted

messaging_product
enum<string>
required
Available options:
whatsapp
Example:

"whatsapp"

contacts
object[]
required
messages
object[]
required