# Request an evidence file

Source: https://checkslip.com/en/docs/create-evidence-export

POST `https://api.checkslip.com/api/audit/exports`

API key

Builds an evidence file of the account for the chosen UTC days, for an auditor, a bank or a court. Answers 202 with status QUEUED; poll GET with the export_id until it is READY or FAILED. The file holds every activity record (AUDIT_EVENTS) of each day, each line as GET /api/audit/events gives it. Only closed days can be exported: not today, and yesterday only from 10 minutes after midnight UTC (schedule a nightly job after 00:10 UTC), at most 31 days per file. The file is deleted after expires_at, while the manifest stays; download it before then. Uses no credit. Send an Idempotency-Key; a retry with the same value returns the same file and builds nothing new. Needs an API key with both audit:read and audit:export, or the web app sign-in. Through the Checkslip assistant, confirm your password first and send the step_up_proof.

## Parameters

| Field | In | Type | Required |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | `string` | yes |

## Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `from_day` | `string (date)` | yes |
| `to_day` | `string (date)` | yes |
| `streams` | `AUDIT_EVENTS[]` | no |
| `step_up_proof` | `string` | no |

## Responses

### 202 `application/json`

| Field | Type | Required |
| --- | --- | --- |
| `export_id` | `string (uuid)` | yes |
| `status` | `QUEUED \| RUNNING \| READY \| FAILED \| EXPIRED` | yes |
| `from_day` | `string (date)` | yes |
| `to_day` | `string (date)` | yes |
| `streams` | `AUDIT_EVENTS[]` | yes |
| `created_at` | `string (date-time)` | yes |
| `created_by` | `ExportCreator` | no |
| `created_by.type` | `USER \| API_KEY \| ASSISTANT \| STAFF \| SYSTEM` | yes |
| `created_by.id` | `string (uuid) \| null` | no |
| `ready_at` | `string (date-time) \| null` | no |
| `expires_at` | `string (date-time) \| null` | no |
| `manifest` | `ExportManifest \| null` | no |

### Possible errors

400 401 403 409 422 429

An error as Problem Details. All codes are listed at [Error codes](https://checkslip.com/en/docs/errors)

**cURL**

```bash
curl https://api.checkslip.com/api/audit/exports \
  -H "Authorization: Bearer $CHECKSLIP_API_KEY" \
  -H "Idempotency-Key: order-1042-slip-1" \
  -H "Content-Type: application/json" \
  -d '{"from_day":"2026-11-05","to_day":"2026-11-05","streams":["AUDIT_EVENTS"],"step_up_proof":"string"}'
```

**Node.js**

```javascript
const res = await fetch("https://api.checkslip.com/api/audit/exports", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHECKSLIP_API_KEY}`,
    "Idempotency-Key": "order-1042-slip-1",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from_day: "2026-11-05",
    to_day: "2026-11-05",
    streams: ["AUDIT_EVENTS"],
    step_up_proof: "string",
  }),
});
const data = await res.json();
```

**Python**

```python
import os

import requests

res = requests.post(
    "https://api.checkslip.com/api/audit/exports",
    headers={
        "Authorization": f"Bearer {os.environ['CHECKSLIP_API_KEY']}",
        "Idempotency-Key": "order-1042-slip-1",
    },
    json={
        "from_day": "2026-11-05",
        "to_day": "2026-11-05",
        "streams": ["AUDIT_EVENTS"],
        "step_up_proof": "string",
    },
)
data = res.json()
```

```json
{
  "export_id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4",
  "status": "QUEUED",
  "from_day": "2026-11-05",
  "to_day": "2026-11-05",
  "streams": [
    "AUDIT_EVENTS"
  ],
  "created_at": "2026-11-05T09:30:00+07:00",
  "created_by": {
    "type": "USER",
    "id": "0b6c2f5e-8a41-4d1e-9c3a-5f7e2d18a6b4"
  },
  "ready_at": "2026-11-05T09:30:00+07:00",
  "expires_at": "2026-11-05T09:30:00+07:00",
  "manifest": {
    "format": "checkslip-audit-export/3",
    "record_count": 1,
    "sha256": "string",
    "size_bytes": 1
  }
}
```
