POST
/v1/convert Authenticated Convert a bank statement file from one format to another. The input format is auto-detected unless explicitly specified. Returns the converted file as a download.
Parameters (multipart form)
| Name | Type | Required | Description |
|---|---|---|---|
file | File | Yes | The bank statement file to convert |
to | String | Yes | Output format: csv, json, camt053, ofx |
from | String | No | Input format (auto-detected if omitted): mt940, camt053, ofx, csv |
Response
Returns the converted file with appropriate Content-Type and Content-Disposition headers. The detected input format is available in the X-Detected-Format response header.
| Header | Description |
|---|---|
Content-Type | MIME type of the converted file (e.g. text/csv) |
Content-Disposition | Attachment header with suggested filename |
X-Detected-Format | The auto-detected input format (e.g. mt940) |
Examples
Convert MT940 to CSV
curl -X POST https://api.finconvert.dev/v1/convert \
-H "Authorization: Bearer fc_live_xxxxx" \ # Your API key
-F "file=@bank-statement.mt940" \ # Upload a local file
-F "to=csv" \ # Target output format
-o converted.csv # Save response to file Convert with fetch (Node.js)
const fs = require('fs')
const form = new FormData()
form.append('file', fs.createReadStream('statement.mt940'))
form.append('to', 'csv')
const response = await fetch('https://api.finconvert.dev/v1/convert', {
method: 'POST',
headers: { 'Authorization': 'Bearer fc_live_xxxxx' },
body: form,
})
if (!response.ok) {
const error = await response.json()
throw new Error(error.error)
}
const blob = await response.blob()
// Save or process the converted file Convert with requests
import requests
with open('statement.mt940', 'rb') as f:
response = requests.post(
'https://api.finconvert.dev/v1/convert',
headers={'Authorization': 'Bearer fc_live_xxxxx'},
files={'file': f},
data={'to': 'csv'},
)
response.raise_for_status()
with open('converted.csv', 'wb') as out:
out.write(response.content) Error Responses
| Status | Code | Description |
|---|---|---|
400 | MISSING_FILE | No file in request body |
400 | MISSING_PARAM | The to parameter is missing |
401 | UNAUTHORIZED | Missing or invalid API key |
413 | FILE_TOO_LARGE | File exceeds 10MB limit |
See Error Handling for
the full list of error codes and best practices.
Ready to get started?
Get your API key from the dashboard and start converting bank statements.
Go to Dashboard