Loading...
Loading...
Official WhatsApp Cloud API reference for building messaging integrations. Covers sending messages (text, media, templates, interactive), receiving webhooks, conversation lifecycle, phone number management, and error handling. Use when building WhatsApp integrations, sending messages, processing webhooks, or working with the Meta WhatsApp Business Platform API.
npx skill4agent add bellopushon/whatsapp-cloud-api whatsapp-cloud-api| Item | Value |
|---|---|
| Base URL | |
| Send Message | |
| Upload Media | |
| Auth | |
| Required Field | |
| Phone Format | E.164: |
| Rate Limit | 80 messages/second (Cloud API) |
POST https://graph.facebook.com/v21.0/{phone-number-id}/messages
Authorization: Bearer {access-token}
Content-Type: application/json{
"messaging_product": "whatsapp",
"contacts": [{ "input": "+16505555555", "wa_id": "16505555555" }],
"messages": [{ "id": "wamid.HBgL..." }]
}| Type | | Details |
|---|---|---|
| Text | | Plain text, max 4096 chars, supports URL preview |
| Image | | JPEG/PNG, max 5MB, optional caption |
| Video | | MP4, max 16MB, optional caption |
| Audio | | AAC/MP3/OGG, max 16MB |
| Document | | Any format, max 100MB, optional filename |
| Sticker | | WebP, static 100KB / animated 500KB |
| Location | | latitude, longitude, name, address |
| Contacts | | Structured contact cards |
| Reaction | | Emoji reaction to a message |
| Interactive | | Buttons, lists, products |
| Template | | Pre-approved message templates |
{
"object": "whatsapp_business_account",
"entry": [{
"changes": [{
"value": {
"messaging_product": "whatsapp",
"metadata": { "phone_number_id": "ID", "display_phone_number": "NUM" },
"contacts": [{ "profile": { "name": "John" }, "wa_id": "16315551234" }],
"messages": [{
"from": "16315551234",
"id": "wamid.ABC...",
"timestamp": "1683229471",
"type": "text",
"text": { "body": "Hello" }
}]
},
"field": "messages"
}]
}]
}sentdeliveredreadfailed{
"messaging_product": "whatsapp",
"to": "+18091234567",
"type": "text",
"text": { "body": "Hello! How can we help you?" }
}{
"messaging_product": "whatsapp",
"to": "+18091234567",
"type": "template",
"template": {
"name": "hello_world",
"language": { "code": "en_US" }
}
}{
"messaging_product": "whatsapp",
"status": "read",
"message_id": "wamid.HBgL..."
}| Code | Error | Action |
|---|---|---|
| 131030 | Recipient not on WhatsApp | Validate number before sending |
| 131047 | Re-engagement required | Send a template message first |
| 131050 | User stopped marketing messages | Respect opt-out, send only service/utility |
| 131056 | Pair rate limit hit | Slow down, implement backoff |
| 130429 | Rate limit exceeded | Queue messages, max 80/sec |
+{country}{number}hub.challengewamidwa_idwa_id