# reports.export

Create a CSV or evidence ZIP export. Supply format, date filters and idempotencyKey. Tax exports require completed fiscal settings. Exports identify provisional records and unresolved items.

`POST /api/v1/accounting/reports.export`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required

MCP tool: `accounting_export`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `currency` | string |  | Three-letter currency code, such as CAD or USD. |
| `accountId` | string (ID) |  | The ID of a bank, card or payment account, from accounts.list. |
| `from` | string |  | The first date to include, as YYYY-MM-DD. |
| `to` | string |  | The last date to include, as YYYY-MM-DD. |
| `format` | enum | Yes | One of: `csv`, `bundle`. |
| `tax` | boolean |  | Default `false`. |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/reports.export \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "format": "csv"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/reports.export
