Upload and start a job
curl -X POST "https://api.bankstatement.ai/api/v1/jobs" \
-H "Authorization: Bearer bsai_live_YOUR_TOKEN" \
-F "mode=convert" \
-F "statement=@./bankstatement.pdf"Submit PDF, CSV, or XLSX bank statements, poll async jobs, fetch normalized transactions, and download CSV/XLSX exports with one account API token.
Send your token in `Authorization`. Keep it server-side.
Create jobs, poll status, then fetch result JSON or exports.
Use `convert` for rows or `companies` for invoice collection worklists.
curl -X POST "https://api.bankstatement.ai/api/v1/jobs" \
-H "Authorization: Bearer bsai_live_YOUR_TOKEN" \
-F "mode=convert" \
-F "statement=@./bankstatement.pdf"const response = await fetch("https://api.bankstatement.ai/api/v1/jobs/job_id", {
headers: { Authorization: "Bearer bsai_live_YOUR_TOKEN" },
});
const job = await response.json();
if (job.status === "complete") {
console.log(job.resultId);
}import requests
headers = {"Authorization": "Bearer bsai_live_YOUR_TOKEN"}
response = requests.get(
"https://api.bankstatement.ai/api/v1/results/result_id/exports/csv",
headers=headers,
)
response.raise_for_status()
with open("statement.csv", "wb") as file:
file.write(response.content)Successful job creation returns `202` with a job id. Poll `GET /jobs/:id` until `status` is `complete` or `failed`.
Results and exports expire after 7 days. API call metadata appears in your account for 90 days.
`402` means the account needs more pages. `429` includes `retryAfterSeconds` when rate limits apply.
Do not expose API tokens in browser or mobile clients. Proxy requests through your backend.