API Quickstart
Build custom integrations with AccountsOS
RESTful API
Standard REST endpoints with JSON responses
API Key Auth
Simple Bearer token authentication
Rate Limited
1000 requests per hour per key
Authentication
Getting Your API Key
- Log in to your AccountsOS dashboard
- Navigate to Settings → API
- Click Generate API Key
- Copy and securely store your key
Keep your API key secret
Never expose your API key in client-side code, public repositories, or shared documents. Regenerate immediately if compromised.
Using Your API Key
Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEYExample Requests
curl -X GET "https://accounts-os.com/api/transactions?limit=10" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://accounts-os.com/api/transactions?limit=10', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data.transactions);{
"transactions": [
{
"id": "txn_abc123",
"date": "2025-01-06",
"description": "AWS Monthly",
"amount": -45.99,
"currency": "GBP",
"category": {
"id": "cat_software",
"name": "Software & Subscriptions"
},
"confidence": 0.95,
"bank_account_id": "ba_main"
}
],
"pagination": {
"total": 156,
"limit": 10,
"offset": 0,
"has_more": true
}
}Available Endpoints
/api/transactionsList transactions with optional filters
/api/transactions/:idGet a single transaction by ID
/api/transactions/:idUpdate transaction category or notes
/api/documentsList uploaded documents
/api/documents/uploadUpload a new document
/api/deadlinesGet upcoming filing deadlines
/api/reports/profit-lossGenerate P&L report
/api/reports/balance-sheetGenerate balance sheet
/api/reports/vatGenerate VAT summary
/api/contactsList contacts (clients/suppliers)
Rate Limits
Limits
- 1,000 requests per hour
- 100 requests per minute burst
- 10 MB max request body
Response Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1704582000
If you hit rate limits, you'll receive a 429 Too Many Requests response. Wait until the reset time before retrying.
Error Handling
All errors return a JSON response with an error object:
{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid or expired",
"status": 401
}
}Common Error Codes
bad_requestInvalid parametersunauthorizedInvalid API keyforbiddenAccess deniednot_foundResource not foundrate_limitedToo many requestsserver_errorInternal error