Mautic webhooks
Mautic webhooks are signed HTTP POST requests that a Mautic instance sends to your URL about contact activity, either as it happens or in batches from a cron job.
How Mautic webhooks work
Webhooks push contact, company, email, form, page and text message activity to your server, so you don't have to poll Mautic's API. Each webhook has a POST URL, a set of events and a secret. Queue Mode applies to the whole instance: Process Events Immediately sends one event per request as it happens, and Queue Events Only stores events for the Webhooks cron job to send in batches.
The body has no event type field. Each top-level key names an event type, such as mautic.form_on_submit, and holds an array of items, so a queued request can carry several types and several items of each. Every item has its own timestamp, and Mautic sends no event ID or payload version. Mautic's webhook docs carry a banner saying they need a major update, so check field names against a real delivery from your own version.
Key facts
{raw body} The JSON body exactly as sent, with no timestamp or other prefix.
Setting up Mautic webhooks
- Open Webhooks from the cog menu and click New. Enter a name and Webhook POST URL, select the events, and keep or replace the generated secret.
- Choose real-time or queued delivery under Configuration > Webhook Settings. Queued delivery needs
php bin/console mautic:webhooks:processrunning on a schedule. - Click Send Test Payload on the webhook form. It posts fixture files from Mautic's source rather than your data, and some have a different shape from real deliveries. Mautic's docs describe no way to resend a delivery.
- Test locally with
npx hookdeck-cli listen 3000 mautic --path /webhooks/mautic, then use its URL as the Webhook POST URL. Mautic 7 rejects private addresses unless they're listed inwebhook_allowed_private_addresses.
Delivery behaviour
not documented Mautic's docs give no value, so keep handlers fast Retries queued mode only later cron runs retry failures after an hour by default, per Mautic's source Webhook unpublished on a 410 or no successes a 410 does it at once; otherwise it checks the last 100 log entries Duplicates no event ID failed queued items are sent again, so build your own key Known failure modes
From Hookdeck's Mautic guide →-
Real-time events are lost during an outage
In real-time mode, Mautic's source sends each event once and doesn't store it, so an event sent while your endpoint is down doesn't come back. Use queued mode, or put a queue in front of your service.
Retries and failures → -
The webhook unpublishes itself
A
Retries and failures →410response unpublishes a Mautic webhook at once. So does a log with no successes in its last 100 entries, unless auto-unpublish is disabled or the webhook was edited in the last two days. -
A batch is treated as one event
In queued mode one request can hold several event types, each with an array of items. Loop over every key and every item, and return a 2xx only once all of them are stored.
Other Mautic limits → -
Retried items are processed twice
Mautic sends no event ID, and a failed queued request's items are sent again. Deduplicate on the event type, the object's ID and the item's
Handle duplicates →timestamp.
Mautic webhook best practices
- Verify every signature. Mautic's docs say to ignore any request whose signature doesn't match. Compute it over the raw body, before parsing.
- Loop over every key and item. A queued request can hold several event types, each with several items, and a handler that reads only the first drops the rest.
- Return a 2xx quickly. In real-time mode Mautic sends the request while it handles the action that caused it, so a slow endpoint slows Mautic too.
- Choose the delivery mode deliberately. Real-time delivery is immediate but isn't retried. Queued delivery is retried but waits for the cron job.
- Build your own idempotency key.
Items carry no event ID, so combine the event type, the object's ID and the item's
timestamp. - Keep 410 out of your webhook route.
Mautic reads a
410as a request to stop and unpublishes the webhook straight away.
Common Mautic webhook events
Contacts
mautic.lead_post_save_new | Contact is identified for the first time |
mautic.lead_post_save_update | Identified contact record changes |
mautic.lead_channel_subscription_changed | Contact's status on a channel changes |
Forms and pages
mautic.form_on_submit | Contact submits a form |
mautic.page_on_hit | Contact views a landing page or tracked page |
mautic.email_on_send | Email goes out to a contact |
mautic.email_on_open | Tracking pixel suggests a contact opened an email |
Events by resource
| Resource | Events | Payloads |
|---|---|---|
contact | 7 | 4 |
mautic | 4 | 2 |
messaging | 3 | 1 |
In this hub
| Webhook events → | Every covered Mautic event, with payloads where the registry has them. |
| MCP events → | How an agent subscribes to Mautic events as MCP events. |
| Verify signatures → | Signature facts, verification code and common failures. |
| Production guide → | Production problems, such as timeouts and retries, and how to handle them. |
| Agent skill → | Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill mautic-webhooks |
Stop losing real-time Mautic events when your endpoint is down.
Mautic's source doesn't retry real-time deliveries. Hookdeck Event Gateway accepts each one, verifies its signature, queues it and retries to your service on your schedule.