Skip to main content
Delete an expense by its ID. The expense must belong to a profile owned by the authenticated user. Both manual and XML-originated expenses can be deleted.

Authentication

Requires a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

id
string
required
The UUID of the expense to delete.

Response

message
string
Success message confirming the expense was deleted.

Example Request

cURL
curl -X DELETE https://api.tresacontafy.com/api/expenses/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "message": "Gasto eliminado exitosamente"
}

Error Responses

401
error
Unauthorized - Invalid or missing JWT token.
404
error
Expense not found or doesn’t belong to the user.
500
error
Internal server error.
Deleting an expense is permanent and cannot be undone. Make sure you want to delete the expense before making this request.

Build docs developers (and LLMs) love