> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hide Replies

> X API v2 Hide Replies エンドポイントを使用して、認証ユーザーが作成した投稿への返信を非表示または再表示し、X 上の会話をモデレートします。

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

Hide Replies エンドポイントを使用すると、認証ユーザーが作成した投稿への返信を非表示または再表示できます。非表示にされた返信は引き続きアクセス可能ですが、表示するには追加のクリックが必要です。

## 概要

<CardGroup cols={2}>
  <Card title="返信を非表示" icon="eye-slash">
    投稿への返信を非表示にする
  </Card>

  <Card title="返信を再表示" icon="eye">
    以前非表示にした返信を再表示する
  </Card>

  <Card title="会話コントロール" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-chat-unread.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=ce6313d8c0b7b4e5363f2ce80b89f7e4" width="24" height="24" data-path="icons/xds/icon-chat-unread.svg">
    自分の投稿に対するディスカッションをモデレート
  </Card>
</CardGroup>

***

## エンドポイント

| Method | Endpoint                                                | Description  |
| :----- | :------------------------------------------------------ | :----------- |
| PUT    | [`/2/tweets/:tweet_id/hidden`](/x-api/posts/hide-reply) | 返信を非表示または再表示 |

***

## しくみ

返信を非表示にするには `hidden: true` で PUT リクエストを、再表示するには `hidden: false` を送信します:

```json theme={null}
{
  "hidden": true
}
```

***

## 例: 返信を非表示にする

```bash theme={null}
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}'
```

## レスポンス例

```json theme={null}
{
  "data": {
    "hidden": true
  }
}
```

***

## はじめる

<Note>
  **前提条件**

  * 承認済みの[開発者アカウント](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 開発者コンソール内の [Project と App](/resources/fundamentals/developer-apps)
  * [OAuth 2.0 PKCE](/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) によるユーザーアクセストークン
</Note>

<CardGroup cols={2}>
  <Card title="クイックスタート" icon="https://mintcdn.com/x-preview/oR-aRNyj1BKPJtxM/icons/xds/icon-rocket.svg?fit=max&auto=format&n=oR-aRNyj1BKPJtxM&q=85&s=b978d7a9225de31709efbbed5b84e92d" href="/x-api/posts/hide-replies/quickstart" width="24" height="24" data-path="icons/xds/icon-rocket.svg">
    最初の返信を非表示にする
  </Card>

  <Card title="API リファレンス" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-code.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=488e23401b19225b89acc0136d242219" href="/x-api/posts/hide-replies" width="24" height="24" data-path="icons/xds/icon-code.svg">
    エンドポイントの完全なドキュメント
  </Card>
</CardGroup>
