hub WhatsApp Gateway

On-Site Documentation

Responsible Messaging

Build transactional WhatsApp workflows with purpose classification, fair-use limits, opt-out handling, and policy-aware error handling.

Policy-Aware Integration

Responsible Transactional Usage

WhatsApp Gateway is designed for transactional, operational, support, authentication, and internal team messages. Marketing is not allowed.

Allowed message_purpose Values

  • transactional
  • operational
  • support
  • internal_team
  • authentication

Disallowed Values

  • marketing
  • promotion
  • cold_outreach
  • bulk_campaign
  • political

Send Message Example

Every send request should include message_purpose.

POST /api/send-message

Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body:
{
  "instance_id": "inst_12345",
  "phone": "+9665XXXXXXX",
  "message": "Your order #2041 has been shipped.",
  "message_purpose": "transactional"
}
Response:
{
  "success": true,
  "status": "sent",
  "message_id": "string",
  "log_id": 123
}

Plan Limits

Each plan includes daily and monthly fair-use limits. Limits protect gateway reliability and prevent misuse.

Plan Daily limit Monthly fair use
Starter100/day2,000/month
Growth500/day10,000/month
Scale1,500/day30,000/month

Error Responses

Responsible messaging and limit failures use the same JSON shape across API-style responses.

{
  "success": false,
  "error": "error_code",
  "message": "Human readable explanation.",
  "details": {
    "action": "block",
    "risk_score": 90,
    "limit": 100,
    "used": 100
  }
}
Error HTTP Message
invalid_api_key 401 A valid API key is required.
revoked_api_key 401 This API key has been revoked.
invalid_json 400 Request body must be valid JSON.
validation_error 422 The request payload is missing required fields.
invalid_instance 404 The requested instance was not found for this API key.
message_purpose_required 422 message_purpose is required. Allowed values are transactional, operational, support, internal_team, and authentication.
message_purpose_not_allowed 422 WhatsApp Gateway does not support marketing, cold outreach, political, or bulk campaign messaging.
daily_message_limit_exceeded 429 Your daily transactional message limit has been reached. Please try again tomorrow or request a higher reviewed limit.
monthly_message_limit_exceeded 429 Your monthly fair-use message limit has been reached. Please contact support for a reviewed higher limit.
recipient_suppressed 403 This recipient has opted out or has been blocked from non-essential messages.
sending_throttled 429 Sending speed has been temporarily limited to protect gateway reliability and prevent bulk messaging.
instance_paused_for_review 423 This instance has been paused for responsible messaging review.
policy_violation 403 This message appears to violate WhatsApp Gateway responsible messaging rules. Bulk marketing, spam, and cold outreach are not allowed.
gateway_send_failed 502 The message passed responsible messaging checks, but delivery could not be completed. Please try again or contact support.

message_purpose_required

{
    "success": false,
    "error": "message_purpose_required",
    "message": "message_purpose is required. Allowed values are transactional, operational, support, internal_team, and authentication.",
    "details": {
        "action": "block",
        "risk_score": 0
    }
}

message_purpose_not_allowed

{
    "success": false,
    "error": "message_purpose_not_allowed",
    "message": "WhatsApp Gateway does not support marketing, cold outreach, political, or bulk campaign messaging.",
    "details": {
        "action": "block",
        "risk_score": 100
    }
}

daily_message_limit_exceeded

{
    "success": false,
    "error": "daily_message_limit_exceeded",
    "message": "Your daily transactional message limit has been reached. Please try again tomorrow or request a higher reviewed limit.",
    "details": {
        "action": "block",
        "risk_score": 90,
        "limit": 100,
        "used": 100
    }
}

monthly_message_limit_exceeded

{
    "success": false,
    "error": "monthly_message_limit_exceeded",
    "message": "Your monthly fair-use message limit has been reached. Please contact support for a reviewed higher limit.",
    "details": {
        "action": "block",
        "risk_score": 90,
        "limit": 2000,
        "used": 2000
    }
}

recipient_suppressed

{
    "success": false,
    "error": "recipient_suppressed",
    "message": "This recipient has opted out or has been blocked from non-essential messages.",
    "details": {
        "action": "block",
        "risk_score": 100
    }
}

sending_throttled

{
    "success": false,
    "error": "sending_throttled",
    "message": "Sending speed has been temporarily limited to protect gateway reliability and prevent bulk messaging.",
    "details": {
        "action": "throttle",
        "risk_score": 65
    }
}

instance_paused_for_review

{
    "success": false,
    "error": "instance_paused_for_review",
    "message": "This instance has been paused for responsible messaging review.",
    "details": {
        "action": "pause_instance",
        "risk_score": 100
    }
}

policy_violation

{
    "success": false,
    "error": "policy_violation",
    "message": "This message appears to violate WhatsApp Gateway responsible messaging rules. Bulk marketing, spam, and cold outreach are not allowed.",
    "details": {
        "action": "block",
        "risk_score": 90
    }
}

Opt-Out Webhook Event

If an inbound opt-out message is detected, your webhook receiver may see a suppression event like this.

{
  "event": "recipient.opted_out",
  "instance_id": "demo-support-line",
  "instance_name": "Demo Support Line",
  "from": "+9665XXXXXXX",
  "reason": "recipient_requested_stop",
  "message_text": "STOP",
  "timestamp": "2026-05-08T10:00:00Z"
}

Best Practices

  • Send messages only to expected recipients.
  • Keep messages transactional and relevant.
  • Avoid repeated identical content.
  • Avoid suspicious or shortened links.
  • Respect opt-outs.
  • Monitor failed delivery rates.
  • Use official Meta/BSP channels where approved marketing is required.