deleteTransaction — deletes a transaction by ID.
Use with an AI agent
Export this page as Markdown or bundle it with a task for your agent.
Try a task
Preview the prompt that will be copied
Reference
Authentication: bearer token required (see how to get a token)
deleteTransaction — deletes a transaction by ID.
The transaction is kept in the trash for 30 days and can be added back with
restoreTransaction; its attached files are kept until the trash entry is purged.
The authenticated user must be the owner or collaborator of the account the
transaction belongs to, and must have an OWNER or COOWNER role if a role is
assigned to their credentials. Deleting a purchase also deletes or unlinks its
linked refunds, so the user must be able to write every account those refunds
belong to.
Authentication: Required (Bearer token)
Parameters:
- transactionId (string, required): ID of the transaction to delete
- preserveExactAmounts (boolean): Opt in to precision-aware deletion
- expectedExactVersion (string, required for exact transactions): Version from a precision-aware read; stale versions are rejected
Returns:
- message (string): Always "ok" on success
Errors:
- unauthenticated: No valid auth token provided
- permission_denied: User is not allowed to delete this transaction
- invalid_params: transactionId missing, transaction not found, or account not found