Overview
The Delete Expense Category endpoint allows you to permanently remove custom expense categories that are no longer needed. This operation has strict safety checks to prevent data loss. Important Restrictions:- You can only delete custom categories that you created
- System default categories cannot be deleted
- Categories must have no expenses assigned to them
- Categories must have no subcategories under them
- Categories must belong to your firm
Path Parameters
The unique identifier of the expense category to delete
Safety Checks
Before deleting a category, the system performs several validation checks:- System Protection: Cannot delete system/default categories
- Usage Check: Cannot delete categories that have expenses assigned
- Hierarchy Check: Cannot delete categories that have subcategories
- Ownership: Can only delete categories belonging to your firm
Response
Success message confirming the category deletion
The ID of the deleted category
Pre-Deletion Checklist
Before attempting to delete a category:- Move or delete all expenses using this category
- Delete or reassign all subcategories under this category
- Confirm it’s a custom category (not a system default)
Best Practices
Before Deleting Categories
- Check Dependencies: Use the List Expenses API to find expenses using this category
- Reassign Expenses: Move expenses to different categories before deletion
- Handle Subcategories: Delete or reassign all subcategories first
- Backup Important Data: Export expense data if the category contains historical records
Alternative to Deletion
Instead of deleting categories, consider:- Hide Categories: Set
is_visible: false
to hide unused categories - Rename Categories: Update the name for repurposing
- Archive Approach: Keep historical categories for reporting consistency
Authorizations
Use your API key (sk_live_xxx or sk_test_xxx)
Path Parameters
Category ID