imports.preview
Validate a CSV import using accountId, csv text and mapping with date, description, amount or debit/credit, and dateFormat. Returns errors without booking transactions.
POST
/api/v1/accounting/imports.previewPermissions
accounting:read
Who can call it
admin, finance
Retries
Safe to retry: it only reads
MCP
accounting_preview_bank_importFields
accountIdstring (ID)RequiredThe ID of a bank, card or payment account, from accounts.list.
csvstringRequiredat most 5000000 characters
filenamestringThe file's name, including its extension.
1–255 characters · Default "statement.csv"
currencystringRequiredThree-letter currency code, such as CAD or USD.
mappingobjectRequiredNo other fields
Example
curl https://app.getoatmilk.com/api/v1/accounting/imports.preview \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
"csv": "example",
"currency": "CAD",
"mapping": {
"date": "2026-09-30",
"description": "Synthetic example from the docs",
"dateFormat": "YYYY-MM-DD"
}
}'{
"data": { … }
}Try it
Try it
Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.
POST/api/v1/accounting/imports.preview
curl https://app.getoatmilk.com/api/v1/accounting/imports.preview \
-H "Authorization: Bearer $OATMILK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
"csv": "example",
"currency": "CAD",
"mapping": {
"date": "2026-09-30",
"description": "Synthetic example from the docs",
"dateFormat": "YYYY-MM-DD"
}
}'More in Transactions.