Integrate WhatsApp messaging into any website, app or software. Full API reference with PHP, Python and cURL examples.
All API requests require a Bearer token from your Postabi dashboard.
// Include in every request header Authorization: Bearer YOUR_API_TOKEN Content-Type: application/json
Send a plain text WhatsApp message to any number.
POST https://api.postabi.com/v1/send
// Request Body
{
"to": "923001234567",
"message": "Hello Ahmed! Your order is confirmed."
}
// Response 200 OK
{"status":"sent","message_id":"msg_abc123"}Send any WhatsApp-supported media via URL.
POST https://api.postabi.com/v1/send-media
{
"to": "923001234567",
"type": "image", // image|video|audio|document
"media_url": "https://example.com/product.jpg",
"caption": "New product just arrived!"
}Send a message to thousands of contacts at once.
POST https://api.postabi.com/v1/send-bulk
{
"contacts": ["923001234567","923111234567"],
"message": "Dear {name}, your invoice is ready!",
"variables": [{"name":"Ahmed"},{"name":"Sara"}]
}
// Response
{"queued": 2, "campaign_id": "camp_xyz"}Validate which numbers are on WhatsApp before sending.
POST https://api.postabi.com/v1/validate
{"numbers": ["923001234567","923111234567"]}
// Response
{"valid":["923001234567"],"invalid":["923111234567"],"total":2}Check delivery status of a sent message.
GET https://api.postabi.com/v1/status/msg_abc123
// Response
{"message_id":"msg_abc123","status":"delivered","read_at":"..."}Set webhook URL in dashboard to receive incoming WhatsApp messages.
// Postabi POSTs to your webhook URL when a message is received:
{
"from": "923001234567",
"message": "Hello, I want to order",
"type": "text",
"timestamp": "2025-01-15T10:30:00Z"
}WhatsApp us to get your API token and a developer onboarding session.
💬 Get API Token