Update Account
PUT /api/v1/accounts/:id
Updates an existing account. Only provided fields will be updated.
Path Parameters
| Parameter | Type | Description |
|---|
| id | string | Account ID |
Request Body
All fields are optional. Only provided fields will be updated.
| Field | Type | Description |
|---|
| name | string | Account name |
| category | string | Account type: bank or credit_card |
| description | string | Account description |
| acc_no | string | Account number |
| currency | string | Currency code |
| color | string | Hex color code |
| opening_balance | number | Opening balance |
| opening_balance_date | string | Date when opening_balance was valid (YYYY-MM-DD). Auto-set to today if not already set when opening_balance is updated. |
| upload_frequency | string | Upload frequency |
| status | string | Lifecycle state: active, retired, or quarantined |
| review | object | Review status object (see below) |
Review Object
| Field | Type | Description |
|---|
| is_done | boolean | Whether review is complete |
| at | string | ISO 8601 timestamp of review |
| type | string | Reviewer type: ai or human |
| by | string | User ID if human reviewer, null if AI |
| work_record_id | string | WorkRecord ID documenting the review |
Example: Update Name and Description
curl -X PUT "https://statements.finopsbricks.com/api/v1/accounts/acc123xyz" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Primary Business Account",
"description": "Main operating account for daily transactions"
}'
Example: Change Upload Frequency
curl -X PUT "https://statements.finopsbricks.com/api/v1/accounts/acc123xyz" \
-H "api-key: fob_stm_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"upload_frequency": "monthly"
}'
Response
{
"data": {
"id": "acc123xyz",
"name": "Primary Business Account",
"category": "bank",
"description": "Main operating account for daily transactions",
"acc_no": "1234567890",
"currency": "INR",
"color": "#3B82F6",
"opening_balance": 10000.00,
"opening_balance_date": "2025-01-01",
"status": "active",
"upload_frequency": "monthly",
"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"
}
}
}
Errors
| Code | Description |
|---|
| 400 | Validation error (invalid category, invalid upload_frequency, etc.) |
| 401 | Invalid or missing API credentials |
| 403 | API key lacks accounts:edit permission |
| 404 | Account not found |