Webhooks
Webhooks let your systems react to booking events in real-time. When a booking is confirmed or cancelled, Slotflow sends an HTTP POST to your registered URL with the event details.
Supported events
Registering a webhook
- Each URL can only be registered once per organization (duplicates are rejected)
- You can register for one or both events
- The URL must be reachable from the internet
- The response includes a
signing_secret(prefixedwhsec_) — store it securely to verify incoming payloads
Webhook limits by plan
Payload format
Every webhook delivery is an HTTP POST with a JSON body:
The data object contains the full booking, including the metadata your agent passed when creating the booking. This is how you connect webhook events back to your agent’s workflow.
Delivery behavior
- Method: HTTP POST
- Content-Type:
application/json - Timeout: 10 seconds — your endpoint must respond within 10 seconds
- Success: Any 2xx response code
Retry schedule
If your endpoint fails (non-2xx response or timeout), Slotflow retries:
After 3 failed attempts, the delivery is marked as failed. No further retries are attempted.
Signature verification
Every webhook delivery includes an X-Slotflow-Signature header that lets you verify the payload was sent by Slotflow and hasn’t been tampered with. The signature uses HMAC-SHA256 with a timestamp to prevent replay attacks.
Header format
t— Unix timestamp (seconds) when the payload was signedv1— HMAC-SHA256 hex digest of{timestamp}.{raw_body}using your webhook’ssigning_secret
Verifying in Node.js
Verifying in Python
Important notes
- Always use the raw request body (not parsed JSON) when computing the signature
- Use timing-safe comparison (
crypto.timingSafeEqualin Node.js,hmac.compare_digestin Python) to prevent timing attacks - Reject timestamps older than 5 minutes to prevent replay attacks
- Store your
signing_secretsecurely (environment variable, secrets manager)
Building a webhook handler
Express.js example
Python (Flask) example
Using metadata
Metadata is the bridge between your agent’s workflow and webhook events. Whatever JSON you pass in the booking’s metadata field appears in the webhook payload.
Common metadata patterns:
Your webhook handler reads data.metadata to route the event to the right system:
Managing webhooks
List webhooks
Delete a webhook
Best practices
-
Verify signatures — always verify the
X-Slotflow-Signatureheader to ensure payloads are authentic. Reject any request with an invalid or missing signature. -
Respond 200 immediately — do heavy processing asynchronously. Slotflow times out after 10 seconds and will retry, which could cause duplicate processing.
-
Make handlers idempotent — due to retries, you may receive the same event twice. Use
data.id(the booking ID) to deduplicate. -
Log webhook payloads — store the raw payload for debugging. If something goes wrong, you’ll want to see exactly what was delivered.
-
Use HTTPS — your webhook URL should use HTTPS in production to protect the payload in transit.
-
Monitor delivery — check the Slotflow dashboard for failed deliveries. Common causes: endpoint down, slow response (>10s timeout), non-2xx response codes.