# Delete all posts by a user on entire site with API?

**URL:** <https://meta.discourse.org/t/delete-all-posts-by-a-user-on-entire-site-with-api/302332>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [April 4, 2024, 2:53am UTC](https://meta.discourse.org/t/delete-all-posts-by-a-user-on-entire-site-with-api/302332 "2024-04-04T02:53:10Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [April 4, 2024, 3:37pm UTC](https://meta.discourse.org/t/delete-all-posts-by-a-user-on-entire-site-with-api/302332/19 "2024-04-04T15:37:19Z")

</div>

> [@45thj5ej](#):
>
> Oh, sweet! So I would just make the URL:  
> `http://mysite.com/admin/users/79/delete_posts_batch` ?  
> Or, what is the “79” here? a user ID I assume that you get when you go to the user’s profile?

Yes, that’s the user’s ID, and it’s a `PUT` request. It returns the number of deleted posts.

---

_[View the full topic](https://meta.discourse.org/t/delete-all-posts-by-a-user-on-entire-site-with-api/302332)._
