awam for developers

Your product stays in front. awam runs WhatsApp.

Send updates from any workflow, show balance and connection health, and bring customer answers back into your product. Each business connects its own WhatsApp Business number through Meta consent.

POST /api/v1/events/{connection-token}Quick start ↓
1

One connection per business

Never reuse a key across customers. Every key is isolated to one workspace, wallet and number.

2

Coexistence in a small window

Open the Awam connect link. The business owner approves inside Meta, then returns to your product.

3

Run workflows and replies

Send every change with a stable ID and poll button replies incrementally without duplicates.

UNIVERSAL QUICK START

One clear event

Use one unique, stable event_id for every change. Retrying it is safe and will not create a second record or message.

  • event workflow.status_changed
  • object.id the record ID in your system
  • object.type order, appointment, shipment, job or any record type
  • object.customer name and international WhatsApp number
curl -X POST "https://awam.io/api/v1/events/YOUR_CONNECTION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "event_id": "workspace-42-record-100-update",
    "event": "workflow.status_changed",
    "object": {
      "id": "RECORD-100",
      "type": "request",
      "customer": {"name": "Mariam", "phone": "+201001112222", "language": "ar"},
      "details": "Your business-specific details"
    }
  }'

Meta connection without sharing Meta secrets

The Coexistence link is browser-only. Open it as a popup from your product. Its key stays after # so it is not sent as a Referer; Awam exchanges Meta’s code and stores the token encrypted.

Production endpoints

POST/api/v1/events/{token}

Create or update a record and run its workflow message.

GET/api/v1/account/{token}

Minor-unit wallet balances, trial, subscription, quota, message price, number health and approved templates.

GET/api/v1/responses/{token}?after_id=0

Button replies only for this connection’s records. Persist next_after_id for the next poll.

LINK/connect/whatsapp#{connect-token}

A separate link shown once when the connection is created or rotated. Open it in a new window; do not use it as the server API token.

What your product should show

Show connection health and balance inside your own UI. When status is not connected, show Connect WhatsApp. When reauthorization_required is true, show Reconnect. When balance is low, show Top up or contact the account administrator.

Core responses

202Accepted or waiting for mapping200Read or duplicate handled400Invalid data429Temporary limit; retry with backoff