Getting Started

TimeEdit Event Broker delivers events to HTTPS endpoints you
register as webhook subscriptions. Deliveries follow the
Standard Webhooks specification for body
shape, headers, and signatures.

This guide covers the delivery behavior you need to build a receiver.


Subscribing

Set up a subscription through the API:

  1. Call POST /subscriptions with an URL and the event types you
    want to receive.
  2. Store the signing secret from the response now — it's shown only this
    once, in the form whsec_<base64>. The secret does not expire.
  3. Have your endpoint respond 2xx to deliveries (see
    Receiving deliveries), then use
    GET /subscriptions/{id}/health to confirm deliveries are succeeding.

At most 5 subscriptions are allowed.

Events

See the Reservation Events pages in the sidebar for details on each event type.

Reservation event types:

  • com.timeedit.reservation.created
  • com.timeedit.reservation.updated
  • com.timeedit.reservation.deleted

Receiving deliveries

Respond with a 2xx within 5 seconds to acknowledge receipt — do the
minimum (verify the signature, enqueue) and process asynchronously. Any
other response, or no response in time, is treated as a failed attempt and
retried.

Each delivery carries:

HeaderValue
webhook-idStable id for the event. Identical across every retry — use it to deduplicate.
webhook-timestampUnix seconds when this attempt was signed.
webhook-signatureSpace-delimited v1,<base64> signatures.
webhook-topicThe event type.

Verifying signatures

Verify every delivery with your secret before trusting it, using, for
example, a Standard Webhooks library for
your language — it handles the raw-body and constant-time comparison
pitfalls for you. In Node:

import { Webhook } from 'standardwebhooks';

const wh = new Webhook(secret); // the whsec_... secret from create/regenerateSecret
const event = wh.verify(rawBody, headers); // throws WebhookVerificationError if invalid

rawBody must be the exact, unparsed request body — re-serializing parsed
JSON changes the bytes and breaks verification.

Rotating the secret

regenerateSecret returns a new secret immediately. For 24 hours
afterward, deliveries are signed with both the previous and the new secret,
verifying against either succeeds during that window. When 24 hours have passed,
only the new secret is valid.

Retries, ordering, and deduplication

A failed delivery is retried with exponential backoff (starting at 30
seconds) for up to 10 retries, roughly 8-9 hours total, after which it's
dropped. Retries reuse the same webhook-id — dedupe on it and make your
handler idempotent (an already-seen webhook-id should be a no-op that
still responds 2xx).

Delivery order across events, including for the same reservation, isn't
guaranteed.

Monitoring and suspension

GET /subscriptions/{id}/health returns delivery metrics (10m/1h/1d/7d/30d
windows) and your most recent delivery attempts.

A subscription that accumulates 250 consecutive failed attempts is
automatically suspended; events are dropped while suspended, with no
buffering or retries. Calling enable reactivates it, but the failure count
isn't reset — if the endpoint is still failing, the very next attempt
suspends it again, confirm it's healthy before re-enabling

Calling disable, or deleting the subscription, stops deliveries
immediately.