# Export and verify the signed ledger

Download every request and decision as a signed export, check it offline, and share a record with an auditor.

Records and security. About 5 minutes. HTML: https://promptcompute.ai/docs/signed-ledger

## Before you start

- An owner, admin or auditor role

## Steps

1. **Start an export** Under Exports, pick JSONL (verifiable), CSV or an evidence pack, and optional filters. Large exports run in the background.

2. **Download** Download from the page, or use the signed link from the API. Links last 24 hours.

3. **Verify the chain** GET /v1/ledger/verify checks every sequence number, hash link, payload hash and Ed25519 signature against the published keys. The offline verifier, @promptcompute/ledger-verify on npm, checks the same things in a JSONL export.

```bash
curl -s https://api.promptcompute.ai/v1/ledger/verify \
  -H "Authorization: Bearer $PROMPTCOMPUTE_API_KEY"
```

4. **Share one record** On a request, press Share with an auditor to create a read-only link that lasts 1 to 30 days.

5. **Keep a record** Place a legal hold on a request so retention never removes it.

## Use cases

### An audit

- Situation: An auditor asks for proof that every production change was approved.
- What to do: Export the last quarter as JSONL and an evidence pack.
- Result: They verify the export themselves; the pack maps records to the controls they test.

### A customer dispute

- Situation: A customer disputes a refund decision.
- What to do: Place a legal hold and share the record with your counsel.
- Result: The record stays, and counsel sees who decided, when and why.

## What you will see

You have a file that carries every hash and signature, a check of the whole chain, and a record you can share or hold.

- GET /v1/ledger/verify ends with ok true and the entry count
- The evidence pack lists each control with linked records
- Shared links open read-only and expire

GET /v1/ledger/verify:

```text
{"progress":{"checked":1000}}
{"result":{"ok":true,"checked":1284,"first_broken":null}}
```

## If something goes wrong

- **Verification fails on a filtered export.** Filtered exports are checked entry by entry; use the file as downloaded, with its header line.
- **The download link expired.** Links last 24 hours. Download again from Exports.
- **Old payloads are missing.** Retention removes payloads past your plan's period. Legal holds keep them.

## Related

- [Secure your organization](https://promptcompute.ai/docs/org-security.md)
- [Earn autonomy](https://promptcompute.ai/docs/autonomy.md)
- [Get decisions by webhook](https://promptcompute.ai/docs/webhooks.md)
