Skip to main content
POST
/
user
/
bulk
/
delete
Bulk Delete Users
curl --request POST \
  --url https://api.royalti.io/user/bulk/delete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ids": [
    "<string>"
  ]
}
'
{
  "message": "Done.",
  "processedCount": 2,
  "failedDeletions": []
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

/user/bulk/delete Description: The /user/bulk/delete endpoint allows administrators to delete multiple users in bulk by providing a list of user IDs. Method:
POST
Request Payload:
ParameterTypeDescription
idsarrayAn array of user IDs to be deleted in bulk.

Code Examples

const response = await fetch('https://api.royalti.io/user/bulk/delete', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ids": [
      {}
    ]
  })
});

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

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
ids
string[]
required

An array of user IDs to be deleted in bulk

Response

success

message
string
processedCount
integer
failedDeletions
string[]