Authentication

API key authentication and environment behavior.

API Key Model

Integration endpoints use API key authentication with Bearer tokens.

  • Test keys start with sk_test_ and simulate delivery.
  • Live keys start with sk_live_ and send real WhatsApp traffic. Requires an active subscription.

Key Prefix Behavior

PrefixBehaviorHost
sk_test_*Sandbox behavior (simulated delivery lifecycle)https://developers-api.chatmaid.net
sk_live_*Production behavior (real WhatsApp delivery)https://developers-api.chatmaid.net

Key Format and Use

POST/v1/messages/sendAuth: API key

Representative protected endpoint using API key Bearer auth.

Authorization Header
curl -X GET https://developers-api.chatmaid.net/v1/messages \
  -H "Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxxxxxxxxx"
Expected 401 Response (Invalid API Key)
{
  "success": false,
  "error": "Unauthorized",
  "message": ["Invalid API key"],
  "statusCode": 401,
  "timestamp": "2026-02-06T14:22:30.000Z",
  "path": "/v1/messages"
}

Scopes and Limits

Common scopes:

  • messages:send (or messages:write)
  • messages:read
  • phone_numbers:read (optional, phone-number endpoints)
  • account:read (optional, account endpoints)

Rate limit is enforced per API key. Default is 100 requests per minute unless account-specific limits are configured.

Environment mapping:

  • Host: https://developers-api.chatmaid.net for both environments
  • sk_test_* -> sandbox behavior
  • sk_live_* -> production behavior

Environment is inferred from key prefix; do not pass environment as request input.

Integration host: https://developers-api.chatmaid.net.

Endpoint to Scope Matrix

EndpointRequired ScopeAlso Accepted
POST /v1/messages/sendmessages:sendmessages:write
GET /v1/messagesmessages:read-
GET /v1/messages/:messageIdmessages:read-
GET /v1/phone-numbers*phone_numbers:readphone-numbers:read, messages:*
GET /v1/account*account:readmessages:read, messages:send, messages:write