Observe WhatsApp
Base URL: https://api.zaphook.cloud
Auth: Authorization: Bearer zph_...
Commands
List Events
node scripts/list-events.mjs [--channel-id <uuid>] [--event-type text|image|audio|status] [--delivery-status delivered|failed|pending|logged|retrying] [--has-errors true|false] [--start-date 2024-01-01T00:00:00Z] [--end-date 2024-01-31T23:59:59Z] [--limit 50] [--offset 0]
GET /api/public/v1/events
Response:
{
"data": {
"events": [{
"id": "uuid",
"channel_id": "uuid",
"event_type": "text",
"event_id": "wamid.abc123",
"delivery_status": "delivered",
"destination_url": "https://example.com/webhook",
"response_code": 200,
"retry_count": 0,
"processing_time_ms": 150,
"created_at": "2024-01-15T10:30:00+00:00"
}],
"total": 1,
"limit": 50,
"offset": 0
}
}
Note: Events are webhook delivery logs (incoming webhooks forwarded to destinations). They track if the event was successfully delivered to configured destinations. Status callbacks (sent/delivered/read) from Meta appear as event_type "status".
Get Event Detail
node scripts/get-event.mjs --event-id <uuid>
GET /api/public/v1/events/{event_id}
Returns full payload, processed_payload, response_body, and delivery metadata.
Channel Health (WABA Status)
node scripts/channel-health.mjs --channel-id <uuid>
GET /api/public/v1/channels/{channel_id}/status
Returns: quality_rating, messaging_limit_tier, status (CONNECTED/DISCONNECTED), verified_name, platform_type, is_active, channel_type.
Upload Media
node scripts/upload-media.mjs --channel-id <uuid> --file <path> --type image|video|audio|document
POST /api/public/v1/media/upload
Get Media
node scripts/get-media.mjs --media-id <id> --channel-id <uuid>
GET /api/public/v1/media/{media_id}?channel_id=
Delete Media
node scripts/delete-media.mjs --media-id <id> --channel-id <uuid>
DELETE /api/public/v1/media/{media_id}?channel_id=
Debugging Workflow
- Check channel health:
node scripts/channel-health.mjs --channel-id <id> - Find failed events:
node scripts/list-events.mjs --has-errors true - Inspect specific event:
node scripts/get-event.mjs --event-id <uuid> - Filter by date range:
node scripts/list-events.mjs --start-date 2024-01-01T00:00:00Z --end-date 2024-01-02T00:00:00Z
Important Notes
- Events represent webhook delivery logs (ZapHook forwarding to your destinations)
- If events are empty but the dashboard shows activity, the channel may not have destinations configured
- Coexistence channels receive status callbacks only if Meta's webhook points to ZapHook
- Standard channels automatically receive all callbacks via their webhook_url
Related skills
zaphook-api— Channel and destination managementwhatsapp-messaging— Send messages and templates