CRM Event Webhook
Send raw lead events. Hashing, matching and dispatch happen server-side.
Endpoint
POST /webhooks/crm-event
Host: mc3-meta-leadform-sync.xvak3803014.workers.dev
Authorization: Bearer <token>
Content-Type: application/json
Body
| Field | Type | |
event | enum | required - contacted · qualified · scheduled · purchase |
email | string | raw; required if no phone |
phone | string | raw, any format |
name | string | optional |
lead_id | string | optional, your record id |
source | string | optional; google is stored, not dispatched |
value | number | purchase only, PLN (default 14575) |
occurred_at | string | optional ISO 8601 |
Example
curl -X POST https://mc3-meta-leadform-sync.xvak3803014.workers.dev/webhooks/crm-event \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"event":"qualified","email":"lead@example.com","phone":"48555123456","source":"facebook"}'
{ "ok": true, "metaEvent": "Qualified", "route": "meta", "enriched": true }
Responses
| Code | |
200 | accepted (or skipped - duplicate / non-dispatched source) |
400 | invalid JSON or unknown event |
403 | missing or invalid token |
422 | no email and no phone |
Notes
| Idempotent per (lead, event) - safe to retry. |
| Raw fields over HTTPS only; hashed before dispatch. |
campaign_id and click id are resolved server-side - no need to send them. |