Introduction
Whatse provides a REST-style interface for connecting your application to WhatsApp communication workflows.
The endpoints below are documentation examples for the website design. Confirm the final production endpoint, authentication method and limits with your Whatse backend before publishing this documentation.
Authentication
Send your API key using the Authorization header.
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Send a text message
POST /api/v1/messages/send{
"to": "+973XXXXXXXX",
"type": "text",
"message": "Hello from Whatse"
}Media messaging
POST /api/v1/messages/mediaUse a media URL or the final upload mechanism supported by your account.
{
"to": "+973XXXXXXXX",
"media_url": "https://example.com/file.jpg",
"caption": "Your order is ready"
}Webhooks
Configure a secure HTTPS endpoint to receive events from your Whatse integration.
{
"event": "message.received",
"message_id": "msg_123",
"from": "+973XXXXXXXX"
}Errors
| Code | Meaning | Action |
|---|---|---|
| 400 | Invalid request | Check payload fields. |
| 401 | Unauthorized | Verify API credentials. |
| 429 | Rate limited | Retry using backoff. |
| 500 | Server error | Retry and contact support if persistent. |