curl -X DELETE https://api.yourfinanceapp.com/api/accounts/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Old Savings Account",
"type": "SAVINGS",
"currency": "USD",
"balance": 0,
"color": "#3B82F6",
"icon": "piggy-bank",
"targetAmount": null,
"targetDate": null,
"isDefault": false,
"userId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-12-20T14:22:00Z"
}
curl -X DELETE https://api.yourfinanceapp.com/api/accounts/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Old Savings Account",
"type": "SAVINGS",
"currency": "USD",
"balance": 0,
"color": "#3B82F6",
"icon": "piggy-bank",
"targetAmount": null,
"targetDate": null,
"isDefault": false,
"userId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-12-20T14:22:00Z"
}
isDefault: true, the deletion will fail with a 400 Bad Request error.accountId field has no explicit onDelete cascade in the schema, so transactions will remain but may need manual cleanup or have their accountId set to null depending on database constraints.curl -X DELETE https://api.yourfinanceapp.com/api/accounts/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Old Savings Account",
"type": "SAVINGS",
"currency": "USD",
"balance": 0,
"color": "#3B82F6",
"icon": "piggy-bank",
"targetAmount": null,
"targetDate": null,
"isDefault": false,
"userId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-12-20T14:22:00Z"
}