Delete Statement
DELETE /api/v1/statements/:id
Permanently deletes a statement and its file metadata. The original file in storage is not removed.
Note: A statement that still has linked transactions cannot be deleted. Either delete the transactions first (see Delete Statement Transactions), or archive the statement instead (see Archive Statement).
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Statement ID |
Example Request
curl -X DELETE "https://statements.finopsbricks.com/api/v1/statements/stmt123xyz" \
-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 statements:delete permission |
| 404 | Statement not found |
| 409 | Statement has linked transactions — delete them first or archive |
409 Response
{
"error": {
"code": "HAS_LINKED_TRANSACTIONS",
"message": "Statement has 47 linked transactions. Delete them first or archive the statement instead.",
"details": { "linked_transactions": 47 }
}
}