API Documentation
Programmatically upload and manage your bank statement documents.
Sign in or create an account to start using the API.
The API allows you to programmatically upload, process, and retrieve analyzed bank statements.
Sign in and generate an API key from your account settings. Your key will be shown once - make sure to save it securely.
curl -X POST https://bankstatementtools.com/api/v1/documents \
-H "Authorization: Bearer your_api_key_here" \
-F "file=@statement.pdf"
All API requests must include your API key in the Authorization header using the Bearer scheme:
Authorization: Bearer your_api_key_here
Unauthorized requests will return a 401 Unauthorized status code.
/api/v1/documents
Upload one or more documents for full processing (including AI analysis).
file - Single file to upload (multipart/form-data)files[] - Multiple files to upload (multipart/form-data)curl -X POST https://bankstatementtools.com/api/v1/documents \
-H "Authorization: Bearer your_api_key" \
-F "file=@statement.pdf"
{
"data": {
"id": 123,
"filename": "statement.pdf",
"status": "uploaded",
"file_format": "pdf",
"created_at": "2025-11-01T12:00:00Z"
}
}
/api/v1/documents/csv_only
Upload documents for CSV conversion only (no AI analysis). This is much faster if you don't need the AI analysis.
file - Single file to upload (multipart/form-data)files[] - Multiple files to upload (multipart/form-data)/api/v1/documents
List all your documents.
{
"data": [
{
"id": 123,
"filename": "statement.pdf",
"status": "processed",
"file_format": "pdf",
"created_at": "2025-11-01T12:00:00Z"
}
]
}
/api/v1/documents/:id
Get details of a specific document.
/api/v1/documents/:id/status
Check the processing status of a document.
{
"data": {
"id": 123,
"status": "processed",
"processed": true,
"processing": false,
"failed": false
}
}
/api/v1/documents/:id
Delete a document.
curl -X DELETE https://bankstatementtools.com/api/v1/documents/123 \
-H "Authorization: Bearer your_api_key"
| Status | Description |
|---|---|
| uploaded | Document has been uploaded and is queued for processing |
| converting_to_csv | Document is being converted to CSV format |
| adding_row_numbers | Adding line numbers to the CSV data |
| data_analysis | AI is analyzing and categorizing transactions |
| processed | Document processing is complete |
| failed | Processing failed (check document format) |
| insufficient_credits | Not enough credits to process this document |
{
"error": "Unauthorized",
"message": "Invalid or missing API key"
}
{
"error": "Not Found",
"message": "Document not found"
}
{
"error": "Bad Request",
"message": "Please provide at least one file"
}
import requests
api_key = "your_api_key_here"
headers = {"Authorization": f"Bearer {api_key}"}
# Upload a document
with open("statement.pdf", "rb") as f:
files = {"file": f}
response = requests.post(
"https://bankstatementtools.com/api/v1/documents",
headers=headers,
files=files
)
document = response.json()["data"]
print(f"Uploaded document {document['id']}")
# Check status
response = requests.get(
f"https://bankstatementtools.com/api/v1/documents/{document['id']}/status",
headers=headers
)
status = response.json()["data"]
print(f"Status: {status['status']}")
require 'net/http'
require 'json'
api_key = "your_api_key_here"
uri = URI("https://bankstatementtools.com/api/v1/documents")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{api_key}"
request.set_form([["file", File.open("statement.pdf")]], "multipart/form-data")
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
document = JSON.parse(response.body)["data"]
puts "Uploaded document #{document['id']}"
const FormData = require('form-data');
const fs = require('fs');
const fetch = require('node-fetch');
const apiKey = 'your_api_key_here';
// Upload a document
const form = new FormData();
form.append('file', fs.createReadStream('statement.pdf'));
fetch('https://bankstatementtools.com/api/v1/documents', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`
},
body: form
})
.then(res => res.json())
.then(data => {
console.log(`Uploaded document ${data.data.id}`);
// Check status
return fetch(`https://bankstatementtools.com/api/v1/documents/${data.data.id}/status`, {
headers: {'Authorization': `Bearer ${apiKey}`}
});
})
.then(res => res.json())
.then(data => {
console.log(`Status: ${data.data.status}`);
});
Copyright © 2025 Bank Statement Tools