User
Delete account
Permanently delete the authenticated user’s account and all associated data.
DELETE
Authentication
All requests to this endpoint must include a valid JWT in theAuthorization header.
What gets deleted
Deleting an account removes the following data for the authenticated user:- All rental invoices from the
RentalInvoicesDynamoDB table. - All retail invoices from the
RetailInvoicesDynamoDB table, including records in all category detail tables (FoodDeliveryInvoices,ClothingInvoices,TechnologyInvoices,SubscriptionInvoices,GroceryInvoices,MiscUtilityInvoices,MiscInvoices). - Gmail OAuth credentials stored in Secrets Manager.
- The user’s folder in S3 (including all uploaded invoice files).
- The user record itself from the
UsersDynamoDB table.
Response
A human-readable confirmation message. Example:
"All data for user <user_id> deleted successfully!"HTTP status code.
200 on success.Always
null for this endpoint.Error responses
| Status | Error code | Description |
|---|---|---|
401 | INVALID_CREDENTIALS | The Authorization header is missing or the token is invalid. |
401 | TOKEN_EXPIRED | The JWT has expired. |
502 | DEPENDENCY_FAILURE | A downstream dependency (DynamoDB, Secrets Manager, or S3) returned an error during deletion. |
500 | INTERNAL_SERVER_ERROR | An unexpected server-side error occurred. |