# How to make "toggle whisper" reply using API and POST request

**URL:** https://meta.discourse.org/t/how-to-make-toggle-whisper-reply-using-api-and-post-request/279192
**Category:** Development
**Tags:** rest-api
**Created:** [September 15, 2023, 10:05pm UTC](https://meta.discourse.org/t/how-to-make-toggle-whisper-reply-using-api-and-post-request/279192 "2023-09-15T22:05:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![audrey\_jin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/audrey_jin/32/326289_2.png) [@audrey\_jin](https://meta.discourse.org/u/audrey_jin)
#### Post date: [September 15, 2023, 10:05pm UTC](https://meta.discourse.org/t/how-to-make-toggle-whisper-reply-using-api-and-post-request/279192/1 "2023-09-15T22:05:02Z")

</div>

I was looking at [Discourse API Docs](https://docs.discourse.org/#tag/Private-Messages/operation/createTopicPostPM) this to create a new post, but I didn’t see a field to make the whisper reply (only visible to some users), can anyone help me with this? Thanks!!

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [September 15, 2023, 10:13pm UTC](https://meta.discourse.org/t/how-to-make-toggle-whisper-reply-using-api-and-post-request/279192/2 "2023-09-15T22:13:40Z")

</div>

I think the information you want is in this topic

> [@Not able to add Whisper Post Using API](https://meta.discourse.org/t/not-able-to-add-whisper-post-using-api/161145/2):
>
> post\_type shouldn’t be needed. If it has a topic\_id it knows it is a post and not a new topic. This is how I’m doing it with curl: curl -i -sS -X POST "http://localhost:3000/posts.json" \ -H "Content-Type: multipart/form-data;" \ -H "Api-Key: 079fb2bb12d3b436bb11bde8eb58aaa9a36560fa7d79b14b3087aa40b1ebc2c4" \ -H "Api-Username: blake.erickson" \ -F "raw=92d2e4a938f8d2c65e3fbbcf68e4c272 374f11b3488a03d5d299e862003b09a3 76cdef8f63901f150f2bbf5579cd0b22" \ -F "topic\_id=11" \ -F "whisper=true…

I would also recommend this topic here as well:

> [@Discourse REST API Documentation](https://meta.discourse.org/t/discourse-rest-api-documentation/22706):
>
> Discourse API Please view the Discourse API Documentation site for detailed info: [https://docs.discourse.org](https://docs.discourse.org)information_source Authentication API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below. The only API endpoints that continue to support credentials in query parameters are requests to…

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 15, 2023, 10:14pm UTC](https://meta.discourse.org/t/how-to-make-toggle-whisper-reply-using-api-and-post-request/279192/3 "2023-10-15T22:14:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
