POST /delete-user
- This endpoint is used to delete a user. It requires the authorization header to be set to an ADMIN API key.
- Docs on the Authorization header can be found here.
- It also requires a
user
header to be set to the username of the user to delete.
Response
The response of this endpoint will be a JSON object with the following properties:
{
"status": "ok",
"message": "Deleted"
}
Example
A basic example of how to use this endpoint in JavaScript:
fetch('https://api.corlink.xyz/delete-user', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'authorization': 'Bearer YOUR_TOKEN',
'user': 'A_USERNAME ex: user123'
},
})