Developer
Welcome to the developer documentation Mahadata. This platform provides a REST API for sending and receiving messages via WhatsApp, SMS, and other channels.
Getting Started in 60 Seconds
Section titled “Getting Started in 60 Seconds”- Get Your API Key
Log in to app.mahadata.io, open Developer > API Keys (
/developer/apikeys), then create a new API key. Copy that key. - Send Your First Message
Use the endpoint
/v1/{phone_number_id}/messageswith your Bearer token:curl curl -X POST https://messaging.mahadata.io/v1/YOUR_PHONE_NUMBER_ID/messages \-H 'Authorization: Bearer YOUR_API_KEY' \-H 'Content-Type: application/json' \-d '{"messaging_product": "whatsapp","to": "6281234567890","type": "text","text": {"body": "Halo dari Mahadata API!","preview_url": true}}' - Receive Webhooks Register a webhook URL in the portal, and we will send message status notifications (sent, delivered, read, failed) in real time.
Base URL & Authentication
Section titled “Base URL & Authentication”Base URL
Section titled “Base URL”https://messaging.mahadata.ioAuthentication
Section titled “Authentication”All API requests require the header Authorization with Bearer token:
Authorization: Bearer YOUR_API_KEYThe API key is obtained from the Developer > API Keys (/developer/apikeys) at app.mahadata.io. Each API key is bound to a single billing account.
Phone Number Format
Section titled “Phone Number Format”Phone numbers use the E.164 format without the +interface:
| Format | Example | Description |
|---|---|---|
| Correct | 6281234567890 | Country code + number |
| Incorrect | +6281234567890 | Do not use the + |
| Incorrect | 081234567890 | Do not use the 0 prefix |
Rate Limit
Section titled “Rate Limit”The platform enforces a rate limit per account to maintain service stability. If the limit is exceeded, the API returns HTTP 429 with header Retry-After.
See page Rate Limits for details per endpoint.
Error Handling
Section titled “Error Handling”The API uses standard HTTP status codes. The error response body is always a flat JSON format with the following fields:
{ "code": 400, "error": "validation_error", "message": "Validation error: Invalid request body"}| Field | Type | Description |
|---|---|---|
code | number | HTTP status code, e.g. 400, 401, 402, 404, 409, 429. |
error | string | A short, machine-readable slug, e.g. validation_error, resource_not_found, payment_required. |
message | string | A human-readable error description. |
details | object | Optional — only appears on certain errors (e.g. resource conflict). This field is omitted when empty. |
See the Error Codes for the complete list and retry guide.
Next steps
Section titled “Next steps”SDK & Tools
Section titled “SDK & Tools”Postman Collection is available to speed up testing:
- Import the collection from the portal or the file provided by the team Mahadata
- Set environment variables:
base_url,api_key,phone_number_id,recipient_phone - Start with the request Health Check to verify connectivity