# investigations.run

Run the receipt investigator now for one transaction or receipt (entryId) with an idempotencyKey: it gathers what Oatmilk knows, asks the investigator for a judgement, links a receipt charged to a hotel room to the hotel's charge, and asks a person one plain question when it can't tell. Returns the run id to follow. Administrator access required.

`POST /api/v1/accounting/investigations.run`

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

MCP tool: `accounting_investigations_run`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `entryId` | string (ID) | Yes | The ID of an accounting entry, from entries.list or attention.mine. |
| `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/investigations.run \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "entryId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10"
}'
```

Reference page: https://app.getoatmilk.com/docs/api/investigations.run
