Skip to content

Developer

Welcome to the developer documentation Mahadata. This platform provides a REST API for sending and receiving messages via WhatsApp, SMS, and other channels.

  1. 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.
  2. Send Your First Message Use the endpoint /v1/{phone_number_id}/messages with 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
    }
    }'
  3. Receive Webhooks Register a webhook URL in the portal, and we will send message status notifications (sent, delivered, read, failed) in real time.
https://messaging.mahadata.io

All API requests require the header Authorization with Bearer token:

Authorization: Bearer YOUR_API_KEY

The 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 numbers use the E.164 format without the +interface:

FormatExampleDescription
Correct6281234567890Country code + number
Incorrect+6281234567890Do not use the +
Incorrect081234567890Do not use the 0 prefix

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.

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"
}
FieldTypeDescription
codenumberHTTP status code, e.g. 400, 401, 402, 404, 409, 429.
errorstringA short, machine-readable slug, e.g. validation_error, resource_not_found, payment_required.
messagestringA human-readable error description.
detailsobjectOptional — 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.

Postman Collection is available to speed up testing:

  1. Import the collection from the portal or the file provided by the team Mahadata
  2. Set environment variables: base_url, api_key, phone_number_id, recipient_phone
  3. Start with the request Health Check to verify connectivity