Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gateway.connexease.com/llms.txt

Use this file to discover all available pages before exploring further.

The Connexease Gateway exposes a single endpoint for all outbound WhatsApp messages. You send one HTTP request — the Gateway authenticates you, checks your rate limits and balance, and forwards the payload to Meta on your behalf. The response contains a wamid that you can use to track delivery status via webhooks. This page covers every supported message type with full parameter references and runnable examples.

Endpoint

POST https://api.gateway.connexease.com/v1/wa/message
Authorization
string
required
API key in Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx format.
Content-Type
string
required
Always application/json.

Query Parameters

mmlite
boolean
default:"false"
When true, routes the request through the Meta Marketing Messages Lite endpoint. Use for high-volume broadcast campaigns.
is_fake
boolean
default:"false"
Sandbox mode. When true, auth, rate limiting, and billing checks run normally; the Meta API call is skipped and a fake wamid is returned. Ideal for development and load testing.

Request Body

messaging_product
string
required
Always "whatsapp".
to
string
required
Recipient phone number including country code, without +, spaces, or dashes. E.g. 905321234567, 14155552671.
type
string
required
Message type. Values: text, image, audio, document, template, interactive.

Message Types

text.body
string
required
Message text. Maximum 4096 characters.
text.preview_url
boolean
default:"false"
Show a link preview if the message contains a URL.
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "text",
    "text": {
      "body": "Hello! Your order has been confirmed.",
      "preview_url": false
    }
  }'
Publicly accessible image URL. Maximum 5 MB. Supported formats: JPG, PNG.
image.caption
string
Caption text displayed below the image.
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "image",
    "image": {
      "link": "https://example.com/images/order-summary.jpg",
      "caption": "Your order summary"
    }
  }'
Publicly accessible audio file URL. Maximum 16 MB. Supported formats: MP3, AAC, AMR, OGG (Opus codec).
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "audio",
    "audio": {
      "link": "https://example.com/audio/welcome.mp3"
    }
  }'
Publicly accessible file URL. Maximum 100 MB.
document.caption
string
Caption text displayed above the document.
document.filename
string
File name shown to the recipient (e.g. invoice_march_2025.pdf).
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "document",
    "document": {
      "link": "https://example.com/docs/invoice.pdf",
      "caption": "Your March 2025 Invoice",
      "filename": "invoice_march_2025.pdf"
    }
  }'
Templates must be pre-approved in Meta Business Manager. They are required for initiating new conversations or contacting users outside the 24-hour service window.
template.name
string
required
The approved template name in Meta Business Manager.
template.language.code
string
required
The language code the template was approved for. E.g. en_US, tr, de. Must exactly match the value in Meta.
template.components
array
Array of components that fill in template variables. Not required if the template has no variables ({{1}}, {{2}}).
Each component:
FieldTypeRequiredValuesDescription
typestringYesheader, body, buttonComponent type
sub_typestringConditionalurl, quick_replyOnly for type: "button"
indexstringConditional"0", "1", "2"Only for type: "button", button order
parametersarrayYesVariable values
Each parameter:
FieldTypeRequiredValuesDescription
typestringYestext, image, document, video, currency, date_timeVariable type
textstringConditionalValue for type: "text"
image.linkstringConditionalURL for type: "image"
Simple template (no variables):
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": { "code": "en_US" }
    }
  }'
Template with body variables:
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "shipping_update",
      "language": { "code": "en_US" },
      "components": [
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "ORD-20251203" },
            { "type": "text", "text": "In Transit" },
            { "type": "text", "text": "December 3, 2025" }
          ]
        }
      ]
    }
  }'
Template with header image + body variables + CTA button:
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "promo_announcement",
      "language": { "code": "en_US" },
      "components": [
        {
          "type": "header",
          "parameters": [
            { "type": "image", "image": { "link": "https://example.com/promo-banner.jpg" } }
          ]
        },
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "John" },
            { "type": "text", "text": "30%" }
          ]
        },
        {
          "type": "button",
          "sub_type": "url",
          "index": "0",
          "parameters": [
            { "type": "text", "text": "spring-sale-2025" }
          ]
        }
      ]
    }
  }'
OTP / Authentication template:
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "otp_verification",
      "language": { "code": "en_US" },
      "components": [
        {
          "type": "body",
          "parameters": [{ "type": "text", "text": "847291" }]
        },
        {
          "type": "button",
          "sub_type": "url",
          "index": "0",
          "parameters": [{ "type": "text", "text": "847291" }]
        }
      ]
    }
  }'
Presents up to 3 tappable buttons. When a user taps a button, an interactive.button_reply webhook event is sent to your endpoint.
interactive.type
string
required
For buttons: "button"
interactive.body.text
string
required
Message body text.
interactive.action.buttons
array
required
Maximum 3 buttons. Each button: type: "reply", reply.id (unique ID, max 256 chars), reply.title (max 20 chars).
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "interactive",
    "interactive": {
      "type": "button",
      "body": {
        "text": "Your order is out for delivery. Choose your delivery preference:"
      },
      "action": {
        "buttons": [
          { "type": "reply", "reply": { "id": "home_delivery",    "title": "Home Delivery" } },
          { "type": "reply", "reply": { "id": "cash_on_delivery", "title": "Cash on Delivery" } },
          { "type": "reply", "reply": { "id": "pickup",           "title": "Pick Up In Store" } }
        ]
      }
    }
  }'
Displays a scrollable, sectioned list of options. When a user selects an option, an interactive.list_reply webhook event is sent.
interactive.type
string
required
For lists: "list"
interactive.body.text
string
required
Description text shown above the list.
interactive.action.button
string
required
Label for the button that opens the list. Maximum 20 characters.
interactive.action.sections
array
required
Array of sections. Each section has a title and rows (options). Row id max 200 chars, title max 24 chars.
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "interactive",
    "interactive": {
      "type": "list",
      "body": { "text": "How can we help you today?" },
      "action": {
        "button": "View Options",
        "sections": [
          {
            "title": "Order Management",
            "rows": [
              { "id": "track_order",  "title": "Track Order",  "description": "Find out where your order is" },
              { "id": "cancel_order", "title": "Cancel Order", "description": "Cancel my order" }
            ]
          },
          {
            "title": "Support",
            "rows": [
              { "id": "live_support", "title": "Live Support", "description": "Connect with an agent" }
            ]
          }
        ]
      }
    }
  }'
For high-volume promotional campaigns, add ?mmlite=true. The request body structure is identical to regular template messages.
curl -X POST "https://api.gateway.connexease.com/v1/wa/message?mmlite=true" \
  -H "Authorization: Bearer pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "weekly_newsletter",
      "language": { "code": "en_US" },
      "components": [
        {
          "type": "body",
          "parameters": [{ "type": "text", "text": "John" }]
        }
      ]
    }
  }'

Response

Success (HTTP 200)

{
  "isSuccess": true,
  "data": {
    "messaging_product": "whatsapp",
    "contacts": [
      {
        "input": "905321234567",
        "wa_id": "905321234567"
      }
    ],
    "messages": [
      {
        "id": "wamid.HBgNOTA1Mzk5ODc2NTQzFQIAERgSM0Y3RDg5NjREOUNBMkFFNEE3AA=="
      }
    ]
  }
}
Response Fields:
isSuccess
boolean
true = message accepted. Does not mean the message was delivered.
data.messaging_product
string
Always "whatsapp".
data.contacts[].input
string
The phone number you sent in the request.
data.contacts[].wa_id
string
The WhatsApp-normalized phone number. Usually the same as input.
data.messages[].id
string
The unique wamid for this message. Store this to correlate with incoming delivery status webhooks.

Error Response

{
  "isSuccess": false,
  "errors": {
    "code": "BILL_001",
    "group": "PAYMENT_REQUIRED",
    "description": "Insufficient balance. Please top up your account to continue sending messages."
  }
}
See Error Codes for the full list.

Key Notes

HTTP 200 ≠ Delivered. The response confirms the message was accepted, not that it reached the recipient. Listen to message_status webhook events for actual delivery confirmation.
Store data.messages[0].id in your database. You’ll need this wamid to match it against incoming message_status and read webhooks.
24-hour window: Non-template messages (text, image, etc.) can only be sent within 24 hours of the last message from the user. Outside this window, you must use type: "template".
Template variables: The number and type of items in components[].parameters must exactly match the approved template in Meta Business Manager. Extra or missing parameters will result in a GW_001 error.