Delete User
This endpoint allows you to permanently delete a user and all their associated data from the Lynes Loyalty platform.
Endpoint
DELETE /user/{userId}
Authentication
⚠️
Authentication Required
This endpoint requires a valid JWT token with appropriate permissions.
See our JWT Authentication guide for more details.
Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
userId | string | Yes | The unique identifier of the user |
Example Request
curl -X DELETE "https://api.lynesloyalty.com/v1/user/user_123" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
Response
Success Response (200 OK)
{
"success": true,
"message": "User successfully deleted"
}
Error Responses
401 Unauthorized
{
"error": {
"code": "unauthorized",
"message": "Invalid or expired authentication token"
}
}
403 Forbidden
{
"error": {
"code": "forbidden",
"message": "Insufficient permissions to delete users"
}
}
404 Not Found
{
"error": {
"code": "not_found",
"message": "User with ID 'user_123' not found"
}
}
Important Notes
❌
Permanent Action
Deleting a user is permanent and cannot be undone. All user data including points, event history, challenge progress, and rewards will be permanently removed.
Related Endpoints
- Get User - Retrieve user information
- Update User - Update user details
- Create User - Create a new user