# reconciliation.createEntry

Create an entry from an imported bank transaction with an explicit type and optional category. Reuses existing entries on retry.

`POST /api/v1/accounting/reconciliation.createEntry`

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

MCP tool: `accounting_create_bank_record`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `transactionId` | string (ID) | Yes | The ID of a bank or card transaction, from transactions.list. |
| `categoryId` | string (ID) |  | The ID of a category, from categories.list. |
| `type` | enum |  | One of: `expense`, `income`, `income_refund`, `refund`, `transfer`, `fee`. |
| `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/reconciliation.createEntry \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "transactionId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/reconciliation.createEntry
