Skip to main content
Webhooks send an HTTPS POST to your endpoints when something happens in a workspace, such as an export finishing. You don’t have to poll. Members manage a workspace’s endpoints in the dashboard, under webhooks. There you add an endpoint’s URL, choose the events it gets, copy its signing secret, and see every delivery, with its response. You can also resend one, or send a test event. Managing webhooks needs the workspace:api-keys:manage permission.

Events

Payload

Every event has the same envelope. data is the object as the API returns it: an export as GET /v1/exports/{id} shows it, a generation as GET /v1/generations/{id} does, an asset as GET /v1/assets/{name} does (without its download_url).
An asset.moved event’s data also has previous_name. An export’s download_url expires after about a day. If you handle an event later than that, read the export again for a fresh one.

Verify the signature

Each request is signed with the endpoint’s signing secret (whsec_…), following Standard Webhooks. Check the signature before you trust the body:
  • webhook-id: the event’s delivery ID. It’s the same on every retry of that event.
  • webhook-timestamp: when the request was sent, in seconds since the Unix epoch.
  • webhook-signature: v1, followed by the base64 HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<body>. The key is the base64-decoded part of the secret after whsec_. The header can list several signatures, separated by spaces; accept the request if any of them matches.
Compute the signature over the raw body, before parsing it. Reject requests whose timestamp is more than a few minutes off. The Standard Webhooks libraries do all of this:

Deliveries and retries

Answer with any 2xx status within 15 seconds. Do the work after you answer. If you answer with anything else, or don’t answer in time, the event is retried on a schedule over about a day: after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, then 10 hours twice. An endpoint that keeps failing for days is disabled. Delivery is at least once, so the same event can arrive twice. Use webhook-id, or the envelope’s id, to skip an event you’ve already handled. Events can arrive out of order. Use data’s updated_at, or read the object again, when the order matters.