Skip to main content

Delete user

Delete a user by email (Admin only)

Request

Method: DELETE
Path: /users/{email}

Authentication: Required (Bearer JWT)

Parameters

NameTypeInRequiredDescription
emailstringpathYes

Responses

200 - User deleted successfully

Examples

cURL

curl -X DELETE \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
http://localhost:3000/users/{email}

JavaScript

const response = await fetch('http://localhost:3000/users/{email}', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token,
},
});

const data = await response.json();
console.log(data);

This documentation is automatically generated from the OpenAPI specification.