Skip to main content
Webhooks are how DropHub tells your system that something happened, without you polling for it. Managing them requires the webhooks:manage scope.

Register an endpoint

The response includes the signing secret. Store it immediately — like the API secret, it is disclosed once and can afterwards only be rotated.

Event types

Subscribe to what you act on. An endpoint may subscribe to between 1 and all 11 event types.

The envelope

Every delivery is a JSON body with a stable envelope:
sequence orders events for a shipment. apiVersion identifies the payload contract.

Verifying the signature

Each request carries three headers: The signed message is the delivery id, the timestamp, and the raw request body, joined with literal . characters:
Verify against the raw bytes you received, before any JSON parsing or re-serialisation. Re-encoding the body changes it, and the signature will no longer match.
Compare in constant time, as above. Also reject deliveries whose Webhook-Timestamp is far from your current clock — a valid signature on a very old request is a replay.

Rotating the secret

Rotation returns a new secret and sets previousSecretValidUntil on the endpoint. Until that moment both secrets produce valid signatures, so accept either during the overlap and drop the old one once it passes.

Responding to a delivery

Return a 2xx quickly. Do the work afterwards — acknowledge receipt, then process asynchronously. A non-2xx or a timeout is treated as a failed attempt and retried. Because retries exist, your handler must be idempotent: deduplicate on id, and ignore an event whose sequence you have already applied for that shipment.

Inspecting deliveries

Retrieve one with GET /v2/external/webhook-deliveries/{deliveryId} to see its attempt history.

Replay

Replay returns 202 — it queues the delivery rather than performing it inline. A 409 means the delivery is not in a replayable state.

Testing an endpoint

This sends a synthetic, correctly signed event to the endpoint so you can exercise your verification path before real traffic depends on it.

Pausing

An endpoint is ACTIVE or PAUSED. Pause it with a PATCH (carrying If-Match) while you deploy a change, rather than deleting and recreating it — deletion loses the secret and the delivery history.