# Exports

Evidence bundles for a claim, verifiable offline.

Related guide: [Chain of custody](https://provenanceauth.com/docs/attest/concepts/chain-of-custody.md)

## Endpoints

- `GET /v1/exports/{id}`: [Retrieve an export](#get-v1-exports-id)
- `GET /v1/exports/{id}/download`: [Download an export](#get-v1-exports-id-download)
- `GET /v1/exports`: [List exports](#get-v1-exports)
- `POST /v1/attest/claims/{id}/export`: [Export a claim's evidence](#post-v1-attest-claims-id-export)

## The export object

### Attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Unique identifier for the object. |
| `object` | enum | yes | The type of object. One of `export`. |
| `claim_id` | string | yes | The claim, or case in another vertical, the asset belongs to. |
| `status` | string | yes | The object's current status. |
| `manifest_hash` | string | yes | SHA-256 of the manifest. |
| `timestamp` | object | no | The independent timestamp of the manifest hash, when a timestamp authority is set up. |
| `timestamp.status` | string | yes | The object's current status. |
| `timestamp.reason` | string | yes | The reason given or recorded. |
| `file_count` | integer | yes | Files in the bundle. |
| `download_url` | string | yes | Where to download the ZIP. |
| `expires_at` | string | yes | When it expires. |
| `timestamp_status` | string | no | Whether the manifest was timestamped: `stamped`, `not_configured` or `error`. |
| `created_at` | string | no | When it was created. |

### Example

```json
{
  "id": "exp_01M6VQBD81JH7GK1655G0NMD69",
  "object": "export",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "status": "ready",
  "manifest_hash": "66260f70034f96926d4e85c8d81865984230b965876e53d6c7c40c43ff01d574",
  "timestamp": {
    "status": "not_configured",
    "reason": "TSA_URL is not set on this deployment"
  },
  "file_count": 9,
  "download_url": "/v1/exports/exp_01M6VQBD81JH7GK1655G0NMD69/download",
  "expires_at": "2026-11-08T19:21:47.009Z"
}
```

## Retrieve an export

`GET /v1/exports/{id}`

Returns an evidence export's status and manifest. Exports are kept for 24 hours.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |

### Returns

The export. See [the export object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/export" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export EXPORT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/exports/$EXPORT_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/export`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
const exportId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/exports/${exportId}`, {
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/export", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
export_id = step1["id"]
data = httpx.get(f"{api}/v1/exports/{export_id}", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 200

```json
{
  "id": "exp_01M6VQBD825E85KP67RRF50HXJ",
  "object": "export",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "status": "ready",
  "manifest_hash": "1969c9678d714904b0ede1d5758382c267f307dce22819cbc49a01412fa10ce5",
  "timestamp_status": "not_configured",
  "file_count": 9,
  "created_at": "2026-11-07T19:21:47.010Z",
  "expires_at": "2026-11-08T19:21:47.010Z",
  "download_url": "/v1/exports/exp_01M6VQBD825E85KP67RRF50HXJ/download"
}
```

## Download an export

`GET /v1/exports/{id}/download`

Downloads an evidence export as a ZIP file.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The object's ID. |

### Returns

The evidence bundle, as a ZIP file.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/export" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export EXPORT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/exports/$EXPORT_ID/download" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/export`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
const exportId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/exports/${exportId}/download`, {
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/export", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
export_id = step1["id"]
data = httpx.get(f"{api}/v1/exports/{export_id}/download", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

## List exports

`GET /v1/exports`

Lists the exports you can still download, newest first, from the last 24 hours. An Authorize key or a console session sees the account's evidence packs; an Attest key sees its carrier's claim evidence bundles, and a console session every bundle of its own carriers. Each item is the export's metadata, never its bytes. Download one with `GET /v1/exports/{id}/download`.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Page size, 1–100 (default 20). Outside the range → 400 parameter_invalid. |
| `cursor` | query | string | no | Opaque; pass a response's `next_cursor` back to get the next page. |

### Returns

A page of exports.

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -s -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/export" \
  -H "Authorization: Bearer $PROVENANCE_KEY" > step.json
export EXPORT_ID=$(jq -r '.id' step.json)
curl "$PROVENANCE_API/v1/exports" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/export`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
const exportId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/exports`, {
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/export", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
export_id = step1["id"]
data = httpx.get(f"{api}/v1/exports", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 200

```json
{
  "object": "list",
  "data": [
    {
      "id": "exp_01M6ZNK6HWTDGMV78XBHCCAJNR",
      "object": "export",
      "kind": "claim_evidence",
      "claim_id": "CLM-SANDBOX-FRAUD",
      "status": "ready",
      "manifest_hash": "3fdabb6102be0ebfcb2b6bbec1fa82b1c202af79fc01a491c60eecdadd905fad",
      "timestamp_status": "not_configured",
      "file_count": 9,
      "created_at": "2026-11-09T08:08:02.876Z",
      "expires_at": "2026-11-10T08:08:02.876Z",
      "download_url": "/v1/exports/exp_01M6ZNK6HWTDGMV78XBHCCAJNR/download"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Export a claim's evidence

`POST /v1/attest/claims/{id}/export`

*Available on Enterprise.*

Builds an evidence bundle for a claim: each attestation's bundle and verification, the chain of custody, media hashes, a signed manifest and an offline verifier.

Auth: an API key, as `Authorization: Bearer <key>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Retry a create safely: the same key + request returns the stored response (24 h, per caller). |
| `id` | path | string | yes | The claim, or case in another vertical, the asset belongs to. |

### Returns

The export, with its download link. See [the export object](#object).

### Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)
- [`spend_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#spend_limit_exceeded)

### Request

**curl**

```bash
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe
curl -X POST "$PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/export" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
```

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/claims/CLM-SANDBOX-FRAUD/export`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}` },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/attest/claims/CLM-SANDBOX-FRAUD/export", headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}"}).json()
```

### Response 202

```json
{
  "id": "exp_01M6VQBD81JH7GK1655G0NMD69",
  "object": "export",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "status": "ready",
  "manifest_hash": "66260f70034f96926d4e85c8d81865984230b965876e53d6c7c40c43ff01d574",
  "timestamp": {
    "status": "not_configured",
    "reason": "TSA_URL is not set on this deployment"
  },
  "file_count": 9,
  "download_url": "/v1/exports/exp_01M6VQBD81JH7GK1655G0NMD69/download",
  "expires_at": "2026-11-08T19:21:47.009Z"
}
```
