How to export a workspace's receipts (GET /api/audit/export)

Call GET /api/audit/export with your key or a signed-in session. Leave out workspaceId to get every chain you own, or add ?workspaceId=... for one workspace. Each bundle holds the receipts, the chain head and ClearRun's public keys, which you can check offline.

Last updated

Steps

  1. Export everything you own

    curl -s "https://api.clearrun.net/api/audit/export" \
      -H "Authorization: Bearer $CLEARRUN_API_KEY" \
      -o clearrun-audit.json

    You get an object with "scope": "account" and a bundles array, one bundle per chain you own: your account-level chain (account:<accountId>) and each workspace whose audit level allows export. Nothing from other accounts is included.

  2. Or export one workspace

    curl -s "https://api.clearrun.net/api/audit/export?workspaceId=WORKSPACE_ID" \
      -H "Authorization: Bearer $CLEARRUN_API_KEY" \
      -o clearrun-workspace.json

    You get one bundle. workspaceId must be a workspace on your account. An account: id here returns 404. Leave workspaceId out to get the account-level chain.

  3. Check it offline

    See How to check a whole workspace offline.

Who can export

Who can export
Audit levelPlan that allows itBundle has
noneFree and ProNo export (403 AUDIT_LEVEL)
summaryBusinessReceipts and public verdicts
fullEnterpriseAlso the input and output text

To set a workspace's audit level, email contact@adepoco.com.

Account-level chains

Receipts made with no workspace go to your account-level chain, account:<accountId> (you see it in receipt.workspaceId). It is included when you leave workspaceId out, if your plan allows a summary export. An export only ever holds your own chains.

No SDK or CLI command

There is no export command in the SDK or CLI. Use the HTTP call above.

Bundle fields

bundleVersion, generatedAt, workspaceId, auditLevel, genesis, chainHead, chainIntact, jwks, and receipts (each with receipt and publicVerdict, plus input and output at full).

Errors

  • 403 Workspace audit level does not allow export (AUDIT_LEVEL), also when you leave workspaceId out and none of your chains allows export
  • 404 Workspace not found, also for an account: id in workspaceId