Developer-First API Gateway

← Back to the Developer Hub for quickstart & integration guides

Integrate WhatsApp messaging into any application with our RESTful API.

REST APIAPI Key AuthRate LimitedWebhooks

Quick Start

Authentication
curl -X POST https://api.chatreach.co.za/api/v1/gateway/send/text \
  -H "X-Api-Key: wab_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneLineId": "your-line-guid",
    "to": "27821234567",
    "body": "Hello from ChatReach!"
  }'

Available Endpoints

API Gateway (requires X-Api-Key header)

MethodEndpointDescription
POST/api/v1/gateway/send/textSend a text message
POST/api/v1/gateway/send/templateSend a template message
POST/api/v1/gateway/send/mediaSend image, video, audio, or document
POST/api/v1/gateway/send/interactiveSend buttons or list menus
GET/api/v1/gateway/messages/{phone}?take=50Get conversation history
GET/api/v1/gateway/templatesList approved templates
GET/api/v1/gateway/pingHealth check / validate key
POST/api/v1/gateway/send/flowSend a WhatsApp Flow message
POST/api/v1/gateway/send/reactionSend/remove emoji reaction
POST/api/v1/gateway/send/contactsSend contact cards
POST/api/v1/gateway/send/stickerSend a sticker
POST/api/v1/gateway/send/productSend single product message
POST/api/v1/gateway/send/product-listSend multi-product list
POST/api/v1/gateway/send/location-requestRequest customer location

Internal API (requires JWT Bearer token)

MethodEndpointDescription
POST/api/auth/loginLogin and receive JWT + refresh token
POST/api/auth/registerRegister new user
POST/api/auth/forgot-passwordRequest password reset token
POST/api/auth/reset-passwordReset password with token
POST/api/auth/change-passwordChange password (authenticated)
GET/api/tenants/{id}Get tenant details
POST/api/tenants/configSet WhatsApp credentials
GET/api/customers/{tenantId}List customers (paginated, filterable)
GET/api/team/{tenantId}List team members
POST/api/apikeysGenerate new API key
GET/api/billing/plansList billing plans
GET/api/billing/invoices/{tenantId}Get invoices
GET/api/reports/usage/{tenantId}Full usage analytics
GET/api/sla/incidents/{tenantId}SLA incidents
GET/api/automationsList automations
POST/api/automationsCreate automation
POST/api/automations/{id}/toggleActivate/pause automation
POST/api/automations/{id}/triggerTrigger automation for a contact ({"phone":"27..."})
GET/api/campaignsList campaigns
POST/api/campaignsCreate/schedule campaign
GET/api/ctwa/leadsClick-to-WhatsApp ad leads
GET/api/ctwa/statsCTWA performance stats
GET/api/integrations/webhooksList outbound webhooks
POST/api/integrations/webhooksCreate outbound webhook
POST/api/commerce/carts/shopify/{tenantId}Shopify abandoned checkout webhook
POST/api/commerce/carts/custom/{tenantId}Custom store cart ingestion
POST/api/commerce/orders/custom/{tenantId}Mark carts recovered on purchase
GET/api/commerce/catalog/productsMeta catalog products
POST/api/commerce/capi/purchaseFire Conversions API purchase event
GET/api/commerce/cartsList abandoned carts
POST/api/approvalsSend media for WhatsApp approval (single/bulk)
GET/api/approvalsList approvals (filter: batchId, externalRef, status)
GET/api/approvals/{id}Approval status + rejection reason
POST/api/interactionsFlexible interactive request (any buttons/list + reply capture)
GET/api/interactions/{id}Interaction status + selected option + captured replies
POST/api/interactions/{id}/completeClose capture window
GET/api/crm/contacts/{phone}Contact profile + analytics
POST/api/crm/contacts/{phone}/linkLink CRM customer ID
GET/api/crm/contacts/{phone}/notesRead internal notes
POST/api/crm/contacts/{phone}/notesAdd note from CRM

Outbound Webhooks (CRM Sync)

Subscribe your CRM or any external system to ChatReach events. We POST a signed JSON payload to your endpoint whenever the event fires. Works with Zapier, Make.com, n8n, HubSpot, Salesforce, or custom endpoints.

POST /api/integrations/webhooks
{ "name": "HubSpot Sync", "url": "https://your-endpoint.com/hook", "events": "message.received,contact.created" }

// Every event is delivered as:
{
  "event": "message.received",
  "timestamp": 1747666800,
  "tenantId": "...",
  "data": { "contactId": "...", "phone": "27821234567", "body": "Hi!" }
}

// Verify authenticity — X-ChatReach-Signature header:
// HMAC-SHA256(rawBody, yourSigningSecret) as "sha256=hex"

Events: message.received, message.sent, message.status, contact.created, contact.updated, campaign.completed, automation.completed, ctwa.lead.created — or * for all. Failed deliveries retry 3 times with backoff.

Send Template Example

POST /api/v1/gateway/send/template
{
  "phoneLineId": "guid-of-your-sales-line",
  "to": "27821234567",
  "templateName": "order_shipped",
  "languageCode": "en_US",
  "components": [
    {
      "type": "body",
      "parameters": [
        { "type": "text", "text": "John" },
        { "type": "text", "text": "ORD-4521" }
      ]
    }
  ]
}

Rate Limits & Security

Each API key has a configurable rate limit (default 60 req/min). You can also restrict keys to specific IP addresses. All requests are logged with response times for full visibility.