Delete Account

DELETE /api/v1/accounts/:id

Permanently deletes an account.

Note: Delete is a permanent hard delete and refuses if the account still has linked transactions. To hide an account without losing its data, set its status to retired or quarantined via Update Account instead.

Note: An account that still has linked transactions cannot be deleted. Reassign or delete those transactions first, or set the account's status to retired/quarantined instead (see Update Account).

Path Parameters

ParameterTypeDescription
idstringAccount ID

Example Request

curl -X DELETE "https://statements.finopsbricks.com/api/v1/accounts/acc123xyz" \
  -H "api-key: fob_stm_xxxxxxxxxxxx" \
  -H "api-secret: xxxxxxxxxxxxxxxx"

Response

Returns 204 No Content on success.

Errors

CodeDescription
401Invalid or missing API credentials
403API key lacks accounts:delete permission
404Account not found
409Account has linked transactions — reassign/delete them first, or retire/quarantine instead

409 Response

{
  "error": {
    "code": "HAS_LINKED_TRANSACTIONS",
    "message": "Account has 47 linked transactions. Reassign or delete them first, or set the account's status to retired or quarantined instead.",
    "details": { "linked_transactions": 47 }
  }
}