Introduction
Overview
Webhooks allow the Mobile Calendar API to send real-time notifications to your system whenever specific events occur. Instead of polling the API for updates, your application receives HTTP POST requests directly from the Mobile Calendar server.
Webhooks are ideal for synchronizing data in real time, triggering automations, and keeping external systems (like PMS, CRMs, or custom tools) up to date.
How It Works
Webhooks are queued and delivered asynchronously. In most cases, they are sent within seconds, but under load or retries, delays of up to 2 minutes are possible.
Delivery and Retry Policy
Webhooks are retried automatically if your server does not respond with a 2xx code or times out (>10s).
1st
Immediate
2nd
+1 minute
3rd
+5 minutes
4th
+1 hour
5th
+12 hours
6th
+24 hours
After 6 failed attempts, the webhook is marked as undeliverable and will not be retried further.
Webhook Payload Example
POST
Headers
Content-Type
application/json
X-MC-Event
reservation.created
X-MC-Signature
sha256=ab4d5a67b12f...
X-MC-Delivery-ID
123e4567-e89b-12d3-a456-426614174000
Body
webhookId
string (UUID v4)
Unique identifier of this webhook delivery. It is stable across retries of the same event so you can de-duplicate safely
eventType
string (ENUM)
The event name that triggered this webhook example: reservation.created
timestamp
string (ISO 8601 with timezone offset)
The time the event occurred in our system, not the time your server received it.
data
object or array
The data object contains the minimal payload describing the resource affected by the event.
It includes only key identifiers and metadata necessary to determine what happened and to which object.
Full details should always be fetched from the API using the URL provided in data.links.self
data.links
object or array
The links object provides HATEOAS-style links to related resources.
It allows the receiver to easily fetch the full object affected by the event.
Payload
Security and Privacy
Webhooks include a digital signature to verify authenticity. Use your webhook secret key to compute an HMAC-SHA256 hash of the payload.
Example:
For security and privacy, webhook payloads do not include full entity data. You should always fetch detailed data through the REST API after verifying the webhook.
Always verify the HMAC SHA-256 signature from the X-Webhook-Signature header before trusting payload contents.
Recommended Processing Flow
Do not rely solely on the webhook payload — always retrieve data directly from the API.
Best Practices
Always respond with HTTP 2xx to confirm successful receipt.
Retry processing should be idempotent — handle duplicates safely.
Use HTTPS and IP whitelisting for security.
Avoid blocking operations — handle processing asynchronously.
Validate the event type before acting on it.
Use exponential backoff or queues for downstream API calls.
Regularly monitor undelivered webhook events in your integration logs.
Summary
Webhooks are an essential component for real-time data synchronization between Mobile Calendar and external systems. They are secure, signed, reliable, and asynchronous, ensuring that all critical events are eventually delivered even if temporary issues occur.
By correctly implementing webhook handling, you ensure your integration stays perfectly synchronized without unnecessary polling.
Last updated