List Accounts
GET /api/v1/accounts
Returns a paginated list of accounts.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number |
| limit | number | 100 | Items per page (max 500) |
| fields | string | all | Comma-separated field names |
| status | string | - | Filter by lifecycle state (active, retired, quarantined) |
| category | string | - | Filter by category (bank, credit_card) |
Example Request
curl -X GET "https://statements.finopsbricks.com/api/v1/accounts" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Example: Filter by Category
curl -X GET "https://statements.finopsbricks.com/api/v1/accounts?category=credit_card&status=active" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Response
{
"data": [
{
"id": "acc123xyz",
"name": "Main Business Account",
"category": "bank",
"description": "Primary operating account",
"acc_no": "1234567890",
"currency": "INR",
"color": "#3B82F6",
"opening_balance": 10000.00,
"opening_balance_date": "2025-01-01",
"status": "active",
"upload_frequency": "weekly",
"created_at": "2025-01-01T00:00:00.000Z",
"review": {
"is_done": true,
"at": "2025-01-06T14:30:00.000Z",
"type": "human",
"by": "user123",
"work_record_id": "wr456"
}
}
],
"page_context": {
"count": 1,
"page": 1,
"per_page": 100,
"total": 5,
"has_more": false
}
}
Response Fields
See Account Object for field descriptions.
Errors
| Code | Description |
|---|---|
| 401 | Invalid or missing API credentials |
| 403 | API key lacks accounts:read permission |