# Delete users in bulk

**URL:** <https://community.postman.com/t/delete-users-in-bulk/25658>\
**Category:** Help Hub\
**Created:** [July 10, 2021, 12:19pm UTC](https://community.postman.com/t/delete-users-in-bulk/25658 "2021-07-10T12:19:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpredola](https://avatars.discourse-cdn.com/v4/letter/v/ecae2f/32.png) [@vpredola](https://community.postman.com/u/vpredola)\
**Post date:** [July 10, 2021, 12:19pm UTC](https://community.postman.com/t/delete-users-in-bulk/25658/1 "2021-07-10T12:19:58Z")

</div>

_My question_:  
Hello,  
I need to delete users in bulk, but I am not able to do it as my isntance is able to delete one user at a time.  
For example :  
In order to delete a user I need to make a call DELETE /users/{userid} where the userid is coming from  
GET /users?

Which I need to put one by one in DELETE /users/{userid}  
Can I automate this so the userid is passed automatically to every next DELETE request?  
Thanks

_Details (like screenshots)_:

 ![Screen Shot 2021-07-10 at 2.15.22 PM](https://us1.discourse-cdn.com/getpostman/original/3X/e/9/e9373fdf989d922bcc49ba9351d54834c0cf5555.png)  
 ![Screen Shot 2021-07-10 at 2.16.37 PM](https://us1.discourse-cdn.com/getpostman/original/2X/0/013efa8965bc5d452ce25b3dbed4a486d484a417.png)

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [July 12, 2021, 5:58am UTC](https://community.postman.com/t/delete-users-in-bulk/25658/2 "2021-07-12T05:58:58Z")

</div>

Hi @vpredola, Welcome to the Community!

There could be multiple ways to achieve this. It’s all up to you how you can go ahead. Two ways which I can think of are below.

- Once you hit a get request, you will be getting multiple user IDs in response, which you want to delete. So, you can iterate over each in the test script and send a DELETE request from the test script for each userID using [pm.sendRequest()](https://learning.postman.com/docs/writing-scripts/script-references/postman-sandbox-api-reference/#sending-requests-from-scripts).
- Another way could be to create a .csv file of response from a get request and use the collection runner to iterate for each of the user IDs. That collection will contain only one request

> DELETE /users/{userid}

and {userid} will be picked from .csv file

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [December 13, 2024, 3:11pm UTC](https://community.postman.com/t/delete-users-in-bulk/25658/3 "2024-12-13T15:11:41Z")

</div>

Closed on December 13, 2024, 3:11pm UTC


