Perform a soft delete operation on a user by setting their status to DELETED. This preserves user data while marking them as inactive.
DELETE
/api/v1/user/delete
curl \
--request DELETE 'http://localhost:3500/api/v1/user/delete'
Response examples (200)
{
"id": "user-uuid-123e4567-e89b-12d3-a456-426614174000",
"email": "john.doe@university.edu",
"status": "DELETED",
"message": "User status updated to DELETED",
"lastname": "Doe",
"firstname": "John",
"updatedAt": "2024-01-25T16:30:00Z"
}
Response examples (400)
{
"error": "Bad Request",
"message": "User is already deleted or invalid ID format",
"statusCode": 400
}
Response examples (401)
{
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 401
}
Response examples (403)
{
"error": "Forbidden",
"message": "Insufficient permissions",
"statusCode": 403
}
Response examples (404)
{
"error": "Not Found",
"message": "User not found",
"statusCode": 404
}