DELETE /api/v1/user/delete

Perform a soft delete operation on a user by setting their status to DELETED. This preserves user data while marking them as inactive.

Path parameters

  • id string Required

    The unique identifier (UUID) of the user to delete

Responses

  • 200 application/json

    User successfully soft deleted (status changed to DELETED)

  • 400 application/json

    Invalid user ID format or user already deleted

  • 401 application/json

    Authentication token required

  • 403 application/json

    Insufficient permissions to delete users

  • 404 application/json

    User not found with the provided ID

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
}