Skip to main content
Webhooks allow your application to react to ROOTKey events without polling the API. When an asynchronous operation completes - such as a blockchain anchor being confirmed, or a validation result being produced - ROOTKey sends an HTTP POST request to your configured endpoint with the event payload. Webhooks are the recommended pattern for integrations using RKP-2 and RKP-3, where blockchain anchoring is asynchronous and the API response does not include the final anchor confirmation.

How It Works

  1. You call the ROOTKey API - the response is immediate
  2. ROOTKey processes the operation asynchronously (blockchain anchoring, validation, etc.)
  3. When the operation completes, ROOTKey delivers an event to your webhook endpoint
  4. Your endpoint responds with 2xx to acknowledge receipt

Configuring Webhooks

Webhook endpoints are configured from the ROOTKey platform dashboard:
1

Open Webhook Settings

Navigate to your workspace settings and select Webhooks.
2

Add an endpoint

Enter the HTTPS URL of your endpoint. The endpoint must be publicly reachable and respond to POST requests.
3

Select events

Choose which event types should trigger delivery to this endpoint. You can configure multiple endpoints with different event subscriptions.
4

Save and verify

ROOTKey sends a test event to verify the endpoint is reachable. Confirm receipt in your application.

Event Types


Event Payload

All webhook events share a common envelope structure:

Security - Verifying Webhook Signatures

ROOTKey signs all webhook deliveries with an HMAC-SHA256 signature. You should always verify this signature before processing an event. The signature is included in the X-ROOTKey-Signature header:
To verify:
  1. Retrieve your webhook secret from the ROOTKey dashboard
  2. Compute HMAC-SHA256(secret, raw_request_body)
  3. Compare the result to the value in X-ROOTKey-Signature
  4. Reject events where the signature does not match
Never process a webhook event without verifying its signature. Unverified webhooks can be spoofed by any party that knows your endpoint URL.

Delivery and Retry Policy

If your endpoint returns a non-2xx response or times out, ROOTKey retries delivery according to the schedule above. After all retries are exhausted, the event is marked as failed and visible in the webhook delivery log in the dashboard.

Best Practices

Respond quickly, process asynchronously Your webhook handler should acknowledge the event immediately with a 2xx response and process the payload in a background job. Long-running handlers risk timing out and triggering retries. Implement idempotency Use the event id field to deduplicate - the same event may be delivered more than once during retry cycles. Always verify signatures Reject any event where the signature cannot be verified. Monitor delivery failures Check the webhook delivery log in the ROOTKey dashboard regularly. Persistent failures may indicate endpoint availability issues or signature verification problems.