# 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:** 13

<div class="post-metadata">

**Author:** ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)\
**Post date:** [April 4, 2024, 3:19pm UTC](https://meta.discourse.org/t/delete-all-posts-by-a-user-on-entire-site-with-api/302332/13 "2024-04-04T15:19:53Z")

</div>

Trying the curl command above:

```plaintext
curl -X GET "https://forums.mysite.me/posts.json?username=targetusername" \
-H "Api-Key: eb4065d56u7u6u65u54y54uy566575w4yer343434ac8a770cbeb274bf7f87" \
-H "Api-Username: AdminUsername"

```

So, it ran and fetched me the posts…but then I got this:

```plaintext
C:\Users\User>-H "Api-Key: eb4065d56u7u6u65u54y54uy566575w4yer343434ac8a770cbeb274bf7f87"
'-H' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\User>-H "Api-Username: AdminUsername"
'-H' is not recognized as an internal or external command,
operable program or batch file.

```

Is this normal or why is that happening?

---

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