Skip to content

Latest commit

 

History

History
86 lines (65 loc) · 2.14 KB

introduction.mdx

File metadata and controls

86 lines (65 loc) · 2.14 KB
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
hide replies
unhide replies
reply moderation
hide reply API
manage replies

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.

Overview

Hide a reply to your Post Unhide a previously hidden reply Moderate discussions on your Posts

Endpoint

Method Endpoint Description
PUT /2/tweets/:tweet_id/hidden Hide or unhide a reply

How it works

Send a PUT request with hidden: true to hide a reply, or hidden: false to unhide it:

{
  "hidden": true
}

Example: Hide a reply

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}'

Example response

{
  "data": {
    "hidden": true
  }
}

Getting started

**Prerequisites** Hide your first reply Full endpoint documentation