Browse documentation DocumentationLet’s talk
Documentation / Build with Rokn

Webhooks

Receive workspace events at your HTTPS endpoint and keep an integration in sync.

Subscribe to workspace events

Configure the endpoint in Settings → Webhooks or through the webhook-endpoints API. Rokn sends a POST with a JSON event envelope.

JSON · illustrative envelope
{
  "id": "example-event-id",
  "name": "invoice.paid",
  "occurredAt": "2026-09-27T10:00:00Z",
  "organizationId": "example-workspace-id",
  "payload": {}
}

Verify before processing

Read X-Rokn-Signature, formatted as t=<unix seconds>,v1=<hex hmac-sha256>. Compute the HMAC over the timestamp, a dot and the exact raw body bytes, using the endpoint's signing secret. Compare signatures with a timing-safe comparison and parse the body only after verification. Keep the endpoint secret on your server.

Handle repeat deliveries

Network errors, timeouts, 5xx responses and 408/429 responses are retried. Other 4xx responses stop delivery retries. Use the event ID to avoid processing the same event twice. The payload schema of every event is in the API reference, under its webhooks section.

Failed sends and uploads

  • invoice.send_failed and quote.send_failed: a send that a person asked for failed for good, either with a permanent refusal or after its last retry. They are published to that person only. See Send invoices and quotes through the API.
  • upload.infected: the virus check found malware in an uploaded file and the file was removed. upload.unscannable: the check could not reach a verdict on a file after several tries, so only its uploader can open it and nothing is deleted.

Who receives an event

A webhook endpoint records the member who created or last edited it, and delivers only what that member may read. Each event is checked against the member's current role and levels twice: when it is published and again at delivery. A skipped event is neither a failure nor a retry.

Saving an endpoint needs a role that can read every section the endpoint delivers. If the creator has left, is banned or is pending account deletion, the endpoint receives nothing until an owner or an admin edits it. The step-by-step setup is in the guide API keys and webhooks.