{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-apis/publicapi/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","cards","card"]},"type":"markdown"},"seo":{"title":"Webhooks","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhooks","__idx":0},"children":["Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The M2X Public API can deliver real-time notifications via webhooks. Subscribe to the events your integration cares about — bookings, jobs, consignments, fuel, vehicle timelines, and more — and M2X will POST a payload to your endpoint when they occur."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Advanced functionality"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Webhooks are a more advanced way to integrate with M2X. Before building against them, talk to your M2X account manager about whether webhooks are the right approach for your use case."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-webhooks-work","__idx":1},"children":["How webhooks work"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You register an HTTPS endpoint to receive deliveries."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["M2X sends a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," request with a JSON body each time a subscribed event fires."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your endpoint responds quickly with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]}," status to acknowledge receipt."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"available-events","__idx":2},"children":["Available events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The full set of webhook payloads is documented in the API reference, grouped by domain:"]},{"$$mdtype":"Tag","name":"Cards","attributes":{"columns":2,"cardMinWidth":240},"children":[{"$$mdtype":"Tag","name":"Card","attributes":{"title":"Enterprise events","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"start","variant":"filled","to":"/apis/publicapi/openapi/bookings/factswebhook"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Booking events, site fulfilments, fulfilment requests, offers, and master bookings."]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"Carrier events","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"start","variant":"filled","to":"/apis/publicapi/openapi/jobs/jobwebhook"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Shift publication, jobs, invoices, consignments, vehicle timelines, and fuel."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authenticating-deliveries","__idx":3},"children":["Authenticating deliveries"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you set up a webhook, you choose how M2X authenticates each delivery to your endpoint, so your receiver can confirm the request is genuine. Three methods are supported:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["None"]}," — no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header is sent (not suitable for production use)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Basic"]}," — M2X sends an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: Basic"]}," header built from a username and password you supply."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OAuth 2.0 (client credentials)"]}," — M2X fetches a token from your token endpoint and sends it as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: Bearer <token>"]},". You provide the token endpoint, client ID, and client secret (and optionally a scope and audience)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":4},"children":["Next steps"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Browse webhook payloads in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/publicapi/openapi"},"children":["API reference"]},"."]}]}]},"headings":[{"value":"Webhooks","id":"webhooks","depth":1},{"value":"How webhooks work","id":"how-webhooks-work","depth":2},{"value":"Available events","id":"available-events","depth":2},{"value":"Authenticating deliveries","id":"authenticating-deliveries","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Webhooks"}},"lastModified":"2026-06-10T00:28:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/publicapi/guides/webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}