Skip to main content

1. Send a message

curl -X POST https://api.zapfy.io/message/send-text \
  -H "Authorization: Bearer zpfy_inst_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999998888",
    "text": "Hello from Zapfy!"
  }'
The response confirms WhatsApp accepted the message (✓ sent). Delivery (✓✓) and read come asynchronously via the MESSAGE_STATUS webhook.

2. Register a webhook

In the dashboard, open the instance → SettingsWebhooks, enter the destination URL and pick the events you want. You can have up to 5 webhooks per instance, each subscribing to its own set of events.

3. Receive events

Zapfy sends a POST to your URL with the canonical envelope:
{
  "event": "MESSAGE_RECEIVED",
  "instanceId": "01J9Z...",
  "id": "evt_01J9Z...",
  "timestamp": "2026-06-09T12:34:56.789Z",
  "data": {
    "messageId": "3EB0C767D...",
    "from": "5511999998888",
    "type": "TEXT",
    "text": "Hi!"
  }
}
Reply 2xx to acknowledge receipt. On failure, Zapfy retries the event — use the id field as an idempotency key so you don’t process duplicates.