Batch Delete Users Warrant Cloud Only
Delete up to 100 users in one API request.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Delete Object endpoint instead.
Endpoint
DELETE /v1/users
Parameters
A batch delete request takes a list
of user
objects containing the userId
.
note
Each batch delete request can delete up to 100 new users. Requests containing more than 100 user objects will fail.
Batch deletes are atomic operations. If any error (client or server) is encountered during creation, none of the users will be deleted. Batch delete requests can therefore be safely retried.
Request
- cURL
- Java
- Node.js
curl "https://api.warrant.dev/v1/users" \
-X DELETE \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'[{"userId":"d6ed6474-784e-407e-a1ea-42a91d4c52b9"},{"userId":"hdf24rhser4-234dfdgdfs3"}]'
User[] usersToDelete = { new User("d6ed6474-784e-407e-a1ea-42a91d4c52b9"), new User("hdf24rhser4-234dfdgdfs3") };
client.deleteUsers(usersToDelete);
await warrantClient.User.batchDelete([
{
userId: "d6ed6474-784e-407e-a1ea-42a91d4c52b9",
},
{
userId: "hdf24rhser4-234dfdgdfs3",
},
]);
warrant_token = Warrant::User.batch_delete([
{
user_id: "d6ed6474-784e-407e-a1ea-42a91d4c52b9"
},
{
user_id: "hdf24rhser4-234dfdgdfs3"
}
])
Response
200 OK