Update Account

PUT /api/v1/accounts/:id

Updates an existing account. Only provided fields will be updated.

Path Parameters

ParameterTypeDescription
idstringAccount ID

Request Body

All fields are optional. Only provided fields will be updated.

FieldTypeDescription
namestringAccount name
categorystringAccount type: bank or credit_card
descriptionstringAccount description
acc_nostringAccount number
currencystringCurrency code
colorstringHex color code
opening_balancenumberOpening balance
opening_balance_datestringDate when opening_balance was valid (YYYY-MM-DD). Auto-set to today if not already set when opening_balance is updated.
upload_frequencystringUpload frequency
statusstringLifecycle state: active, retired, or quarantined
reviewobjectReview status object (see below)

Review Object

FieldTypeDescription
is_donebooleanWhether review is complete
atstringISO 8601 timestamp of review
typestringReviewer type: ai or human
bystringUser ID if human reviewer, null if AI
work_record_idstringWorkRecord 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

CodeDescription
400Validation error (invalid category, invalid upload_frequency, etc.)
401Invalid or missing API credentials
403API key lacks accounts:edit permission
404Account not found