curl -X DELETE "<base_url>/usermanagement/v1/users" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "userName=string&serviceName=rmd"
const res = await fetch("<base_url>/usermanagement/v1/users", {
method: "DELETE",
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({ userName: "string", serviceName: "rmd" }),
});
const result = await res.json();
{
"header": {
"code": 1,
"message": "Account has been deleted successfully",
"response_code": 1
},
"body": {
"userName": "string"
}
}
User Management
Delete a User
Permanently delete a user from a service.
DELETE
/
usermanagement
/
v1
/
users
curl -X DELETE "<base_url>/usermanagement/v1/users" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "userName=string&serviceName=rmd"
const res = await fetch("<base_url>/usermanagement/v1/users", {
method: "DELETE",
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({ userName: "string", serviceName: "rmd" }),
});
const result = await res.json();
{
"header": {
"code": 1,
"message": "Account has been deleted successfully",
"response_code": 1
},
"body": {
"userName": "string"
}
}
Permanently deletes the user identified by the given username from the specified service.
See Errors for the response envelope and the full list of codes.
- URL:
/usermanagement/v1/users - Full URL:
<base_url>/usermanagement/v1/users - Request Method: DELETE
Authentication
Send the Access Token in theX-AccessToken request header on every authenticated call:
X-AccessToken: YOUR_ACCESS_TOKEN
Your Secret Key must never be used client-side or committed to source control. Exchange it for an Access Token server-side (see Authentication) and send only the Access Token from client code.
Request Body
Send the fields as form data (application/x-www-form-urlencoded).
string
required
Username of the user to delete.
string
required
Service slug to delete the user from, e.g.
rmd.Sample Request
curl -X DELETE "<base_url>/usermanagement/v1/users" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "userName=string&serviceName=rmd"
const res = await fetch("<base_url>/usermanagement/v1/users", {
method: "DELETE",
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({ userName: "string", serviceName: "rmd" }),
});
const result = await res.json();
curl -X DELETE "<base_url>/usermanagement/v1/users" \
-H "X-AccessToken: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "userName=string&serviceName=rmd"
const res = await fetch("<base_url>/usermanagement/v1/users", {
method: "DELETE",
headers: {
"X-AccessToken": process.env.PUREWL_ACCESS_TOKEN,
"Content-Type": "application/x-www-form-urlencoded",
},
body: new URLSearchParams({ userName: "string", serviceName: "rmd" }),
});
const result = await res.json();
Response
object
Sample Response
Success
{
"header": {
"code": 1,
"message": "Account has been deleted successfully",
"response_code": 1
},
"body": {
"userName": "string"
}
}
{
"header": {
"code": 1,
"message": "Account has been deleted successfully",
"response_code": 1
},
"body": {
"userName": "string"
}
}
Status Codes
| Status | Meaning |
|---|---|
200 | Success. |
500 | Internal server error. |
Error codes
Returned inheader.response_code when the request fails.
| Code | Message |
|---|---|
998 | Internal server error |
1001 | Validation error |
1002 | You are not permitted to the resource! |
1003 | Invalid service slug provided |
1004 | Account is not subscribed to this service |
1005 | Invalid username or reseller |
Next steps
Create a User
Register a new user and onboard them to one or more services.
User Management overview
Review the full account lifecycle and core objects.
Get a User
Retrieve a user’s profile and subscription details before offboarding.