Sending messages
Send text, media, and interactive messages to a WhatsApp user from a connected number.
Endpoint
POST https://api.kirim.dev/v23.0/{PHONE_NUMBER_ID}/messages{PHONE_NUMBER_ID} is the connected number's phone number id. Authenticate with your kirim.dev API key (see Introduction).
Text
text message
{
"messaging_product": "whatsapp",
"to": "62812XXXXXXX",
"type": "text",
"text": { "body": "Hello 👋" }
}Interactive (buttons)
interactive message
{
"messaging_product": "whatsapp",
"to": "62812XXXXXXX",
"type": "interactive",
"interactive": {
"type": "button",
"body": { "text": "Confirm your order?" },
"action": {
"buttons": [
{ "type": "reply", "reply": { "id": "yes", "title": "Yes" } },
{ "type": "reply", "reply": { "id": "no", "title": "No" } }
]
}
}
}Every message type the Cloud API supports works the same way — image, document, location, contacts, list messages, and more. Set the type and the matching object, and send.
Payload details:Full field reference for every message type is in Meta's Cloud API reference →
Response
A successful send returns Meta's response unchanged, including the message id:
{
"messaging_product": "whatsapp",
"contacts": [{ "input": "62812XXXXXXX", "wa_id": "62812XXXXXXX" }],
"messages": [{ "id": "wamid.HBgL..." }]
}