Webhooks
Webhooks allow you to receive real-time HTTP notifications when events occur in ZenFlow.
Webhooks Guide
Check the complete guide to see all available events, sample payloads, and how to verify signatures.
Endpoints
| Method | Endpoint | Description |
|---|
| POST | /webhooks | Subscribe to events |
| GET | /webhooks | List active subscriptions |
Subscribe to Events
To receive notifications, create a webhook specifying your URL and the events you’re interested in:
{
"name": "My notifications",
"url": "https://your-server.com/webhooks/zenflow",
"events": ["order/created", "order/completed", "stock/updated"]
}
Available Events
| Category | Events |
|---|
| Orders | order/created, order/updated, order/cancelled, order/completed |
| Products | product/created, product/updated, product/deleted |
| Stock | stock/updated, stock/low_alert, stock/movement_created |
| Flows | flow/started, flow/completed, flow/cancelled |
Save the secret returned in the response. You’ll need it to verify signatures. It won’t be shown again.
Response
{
"success": true,
"data": {
"id": "wh_abc123",
"name": "My notifications",
"url": "https://your-server.com/webhooks/zenflow",
"events": ["order/created", "order/completed", "stock/updated"],
"secret": "whsec_xxxxxxxxxxxxxxxx",
"active": true,
"created_at": "2024-01-15T10:30:00Z"
}
}