| title | Hide Replies | |||||
|---|---|---|---|---|---|---|
| sidebarTitle | Introduction | |||||
| description | Use the X API v2 Hide Replies endpoint to hide or unhide replies to Posts authored by the authenticated user and moderate conversations on X. | |||||
| keywords |
|
import { Button } from '/snippets/button.mdx';
The Hide Replies endpoint lets you hide or unhide replies to Posts authored by the authenticated user. Hidden replies are still accessible but require an extra click to view.
Hide a reply to your Post Unhide a previously hidden reply Moderate discussions on your Posts| Method | Endpoint | Description |
|---|---|---|
| PUT | /2/tweets/:tweet_id/hidden |
Hide or unhide a reply |
Send a PUT request with hidden: true to hide a reply, or hidden: false to unhide it:
{
"hidden": true
}curl -X PUT "https://api.x.com/2/tweets/1234567890/hidden" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hidden": true}'{
"data": {
"hidden": true
}
}**Prerequisites**
- An approved developer account
- A Project and App in the Developer Console
- User Access Tokens via OAuth 2.0 PKCE