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
statustoretiredorquarantinedvia 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/quarantinedinstead (see Update Account).
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Account 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
| Code | Description |
|---|---|
| 401 | Invalid or missing API credentials |
| 403 | API key lacks accounts:delete permission |
| 404 | Account not found |
| 409 | Account 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 }
}
}