Skip to main content
Uses webhooks instead of polling — the recommended pattern for production integrations where contracts are processed asynchronously.

Workflow fields

We recommend creating this workflow in the anyformat platform where you can test with sample contracts and iterate on field descriptions. Copy the workflow ID to use with the API.

Setup and submit

The workflow is created once. After that, each new contract triggers one webhook delivery when processing finishes.

Handle the webhook callback

When processing completes, your server receives a POST with the collection_id and workflow_id. Verify the HMAC signature, then fetch the results from GET /v2/workflows/{workflow_id}/files/{collection_id}/results/. See Webhooks overview for the full payload schema and the verification recipe. A minimal Python (Flask) handler:
The TypeScript story is analogous: receive the POST in your server framework of choice (Express, Hono, Next route handler…), verify the signature with crypto.createHmac("sha256", secret), then fetch the results via fetch() or the SDK’s low-level client.

Tips

Webhook secrets are only returned at creation. Store the secret immediately. If lost, delete the webhook and create a new one.
  • Webhooks eliminate polling overhead and rate-limit consumption.
  • integer for notice periods lets you do calendar math directly.

Next steps

Webhooks

Set up, sign, and verify webhook deliveries

Field types

multi_select, enum, and other field shapes