Delete the authenticated user account
cURL
curl --request DELETE \ --url https://api.example.com/auth/delete \ --header 'Authorization: <authorization>'
{ "message": "<string>", "user": { "user.id": 123, "user.name": "<string>", "user.email": "<string>", "user.role": "<string>" } }
Authorization: Bearer <jwt_token>
curl -X DELETE https://api.example.com/auth/delete \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{ "message": "Usuario eliminado exitosamente", "user": { "id": 1, "name": "John Doe", "email": "[email protected]", "role": "customer" } }
{ "error": "Unauthorized" }
{ "error": "Usuario no encontrado" }