Skip to main content
POST
/
{phone_number_id}
/
messages
curl --request POST \
--url https://api.kapso.ai/meta/whatsapp/{phone_number_id}/messages \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "15551234567",
"type": "text",
"text": {
"preview_url": false,
"body": "Hello! Your order #12345 has been shipped."
}
}'
{
  "messaging_product": "whatsapp",
  "contacts": [
    {
      "input": "15551234567",
      "wa_id": "15551234567"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgNMTU1NTE0OTU5Nzg1FQIAERgSMDhGRjdBMDEyOTcxQzFFQkFBAA=="
    }
  ]
}

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 Project Settings > 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 WhatsApp ID

Example:

"15551234567"

type
enum<string>
required

Type of WhatsApp message

Available options:
text,
image,
video,
audio,
document,
sticker,
location,
contacts,
interactive,
template,
reaction,
status
recipient_type
enum<string>
default:individual

Recipient type

Available options:
individual,
group
context
object

Reply context

text
object
image
object
video
object
audio
object
document
object
sticker
object
location
object
contacts
object[]
interactive
object
template
object
reaction
object

Response

Message sent successfully

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

"whatsapp"

contacts
object[]
required
messages
object[]
required