API documentation

Webhooks

Version 2026-10-15 · effective Oct 15, 2026

Events

Subscribe an HTTPS endpoint to any of these events in the portal. Every event has the same JSON envelope: `id`, `type`, `api_version`, `created`, `livemode` and `data`, where `data` is the event's payload.

EventSent when
`document.created`A document was uploaded or created through the API.
`document.processed`Extraction finished and structured output is available.
`document.failed`Processing failed after all internal retries.
`document.deleted`A document and its derivatives were permanently removed.
`job.queued`A job was accepted into the queue.
`job.started`A worker picked the job up.
`job.succeeded`The job completed successfully.
`job.failed`The job failed permanently.
`api_key.created`A new key was issued.
`api_key.rotated`A key secret was rotated.
`api_key.revoked`A key was revoked.
`invoice.paid`An invoice was paid successfully.
`invoice.payment_failed`A charge attempt failed.
`subscription.updated`Plan, interval or seats changed.
`usage.threshold_reached`Included usage crossed a configured threshold.
`usage.overage_threshold_reached`Overage spend reached a level of the overage threshold.
`balance.low`The usage balance fell below the low-balance threshold.
`balance.recharge_failed`An automatic recharge of the usage balance failed.

Delivery

A delivery is a `POST` with the JSON body and these headers:

  • `X-Exegesy-Signature`: `t=<unix seconds>,v1=<hex>`.
  • `Content-Type: application/json`.

Delivery is best effort: build your handler to tolerate a delivery that arrives twice, late, or not at all, and reconcile from the API when it matters. Your endpoint must answer a `2xx` status within 10 seconds. Redirects are not followed: a `3xx` counts as a failure. A failed delivery is retried up to five times, with back-off of about 5 minutes, 30 minutes, 3 hours and 18 hours, within 24 hours of the first attempt.

Verify the signature

The signed string is the timestamp, a dot, and the exact raw body bytes. Compute an HMAC-SHA256 with your endpoint's signing secret, hex-encode it, and compare it with `v1` in constant time. Reject a `t` more than 300 seconds from your clock to stop replays.

import hashlib, hmac, time

def verify(header: str, raw_body: bytes, secret: str) -> bool:
    parts = dict(item.split("=", 1) for item in header.split(","))
    timestamp = int(parts["t"])
    if abs(time.time() - timestamp) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Verify against the raw bytes you received, before any JSON parsing or re-serialising.

Rotate a secret

Rolling a secret issues a new one at once. The old secret keeps verifying for a grace period you choose (invalidate immediately, 1 hour, 24 hours or 3 days), so you can switch your endpoint without losing events. Store secrets as carefully as API keys.

Limits

Deliveries are not throttled per second; a flood of events is delivered as it happens. Make your handler quick and move slow work to a queue.