Эта страница пока недоступна на выбранном языке (Русский), поэтому показана на английском.
Events and payloads
The request zmle sends, the envelope, the headers and the event catalogue — the same names plugins use as hooks.
POST /hooks/zmle HTTP/1.1
content-type: application/json
x-zmle-event: invoice.sent
x-zmle-delivery: <delivery id>
x-zmle-timestamp: 1790000000
x-zmle-signature: sha256=<hex>
{ "id": "<delivery id>", "event": "invoice.sent", "createdAt": "2026-09-29T08:00:00.000Z",
"data": { "id": "...", "number": "...", "customerName": "...", "customerEmail": "...",
"total": 105000, "paidAmount": 0, "currency": "AED", "dueDate": "...", "publicUrl": "..." } }These are the header names on hosted zmle. A self-hosted install of the code sends the same four values under its own install prefix (see src/lib/integrations/webhooks.ts). Money fields are integers in minor units.
| Group | Events (selection) |
|---|---|
| Leads and customers | inquiry.created, customer.created |
| Quotations | quotation.sent, quotation.accepted, quotation.declined |
| Invoices and payments | invoice.created, invoice.sent, invoice.paid, payment.received, recurring.generated |
| Shop and deliveries | order.placed, order.status_changed, delivery.created, delivery.dispatched, delivery.delivered |
| Appointments | appointment.booked, appointment.confirmed, appointment.cancelled, appointment.completed, appointment.no_show |
| Point of sale and stock | pos.sale_completed, pos.sale_refunded, pos.session_closed, stock.low, stock.expiring |
| Pipeline and support | deal.created, deal.won, deal.lost, ticket.created, ticket.replied, ticket.resolved |
| System | webhook.test |
The catalogue has 64 events (WEBHOOK_EVENTS in src/lib/integrations/events.ts, webhook.test included). The full, current list with field names is GET /api/v1/events (scope webhooks:read) and the table in the reference page. Privacy rules are built in: HR events never carry pay, payroll.paid sends totals only, ticket events never include internal notes.
curl -s "$ZMLE_BASE/events" -H "Authorization: Bearer $ZMLE_KEY"Written from: docs/API.md, src/lib/integrations/events.ts, src/lib/integrations/webhooks.ts, docs/PLUGIN-DEVELOPER-GUIDE.md