# imports.undo.history

Read paged organization import, Undo, and Restore history with actual ownership counts and audited reasons. Optional batch and account filters keep the list scoped. Restore eligibility is checked by its lazy preview.

`GET | POST /api/v1/accounting/imports.undo.history`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_imports_undo_history`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `batchId` | string (ID) |  | The ID of the related record. |
| `accountId` | string (ID) |  | The ID of a bank, card or payment account, from accounts.list. |
| `cursor` | string |  | Where the next page starts: the nextCursor value from the previous response. 1–512 characters. |
| `limit` | integer |  | How many results to return at most. 1 to 200. Default `50`. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/imports.undo.history \
  -H "Authorization: Bearer $OATMILK_API_KEY"
```

Reference page: https://app.getoatmilk.com/docs/api/imports.undo.history
