API docs

Process bank statements from your own product

Submit PDF, CSV, or XLSX bank statements, poll async jobs, fetch normalized transactions, and download CSV/XLSX exports with one account API token.

Base URL

https://api.bankstatement.ai/api/v1 Manage API token

Bearer auth

Send your token in `Authorization`. Keep it server-side.

Async jobs

Create jobs, poll status, then fetch result JSON or exports.

Two modes

Use `convert` for rows or `companies` for invoice collection worklists.

Upload and start a job

cURL
curl -X POST "https://api.bankstatement.ai/api/v1/jobs" \
  -H "Authorization: Bearer bsai_live_YOUR_TOKEN" \
  -F "mode=convert" \
  -F "statement=@./bankstatement.pdf"

Poll job status

Node
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);
}

Download CSV export

Python
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)

Operational notes

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.