> ## 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.

# Quickstart

> This guide walks you through hiding and unhiding replies to Posts in conversations you. Reference for the X API v2 standard tier covering hide replies.

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <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>;
};

This guide walks you through hiding and unhiding replies to Posts in conversations you started.

<Note>
  **Prerequisites**

  Before you begin, you'll need:

  * A [developer account](https://developer.x.com/en/portal/petition/essential/basic-info) with an approved App
  * User Access Token (OAuth 1.0a or OAuth 2.0 PKCE)
</Note>

***

## Hide a reply

<Steps>
  <Step title="Find the reply's Post ID" icon="message">
    Get the ID of the reply you want to hide. You can only hide replies to conversations started by the authenticated user.

    ```
    https://x.com/user/status/1232720193182412800
                              └── This is the Post ID
    ```
  </Step>

  <Step title="Send the hide request" icon="eye-slash">
    <CodeGroup dropdown>
      ```bash cURL theme={null}
      curl -X PUT "https://api.x.com/2/tweets/1232720193182412800/hidden" \
        -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
        -H "Content-Type: application/json" \
        -d '{"hidden": true}'
      ```

      ```python Python SDK theme={null}
      from xdk import Client
      from xdk.oauth1_auth import OAuth1

      oauth1 = OAuth1(
          api_key="YOUR_API_KEY",
          api_secret="YOUR_API_SECRET",
          access_token="YOUR_ACCESS_TOKEN",
          access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
      )

      client = Client(auth=oauth1)

      # Hide a reply
      response = client.posts.hide_reply("1232720193182412800", hidden=True)
      print(f"Hidden: {response.data.hidden}")
      ```

      ```javascript JavaScript SDK theme={null}
      import { Client, OAuth1 } from "@xdevplatform/xdk";

      const oauth1 = new OAuth1({
        apiKey: "YOUR_API_KEY",
        apiSecret: "YOUR_API_SECRET",
        accessToken: "YOUR_ACCESS_TOKEN",
        accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
      });

      const client = new Client({ oauth1 });

      // Hide a reply
      const response = await client.posts.hideReply("1232720193182412800", {
        hidden: true,
      });
      console.log(`Hidden: ${response.data?.hidden}`);
      ```
    </CodeGroup>
  </Step>

  <Step title="Confirm the reply is hidden" icon="check">
    ```json theme={null}
    {
      "data": {
        "hidden": true
      }
    }
    ```

    The reply is now hidden from the main conversation view. Users can still see it by clicking "View hidden replies."
  </Step>
</Steps>

***

## Unhide a reply

To make a hidden reply visible again:

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X PUT "https://api.x.com/2/tweets/1232720193182412800/hidden" \
    -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{"hidden": false}'
  ```

  ```python Python SDK theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # Unhide a reply
  response = client.posts.hide_reply("1232720193182412800", hidden=False)
  print(f"Hidden: {response.data.hidden}")
  ```

  ```javascript JavaScript SDK theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // Unhide a reply
  const response = await client.posts.hideReply("1232720193182412800", {
    hidden: false,
  });
  console.log(`Hidden: ${response.data?.hidden}`);
  ```
</CodeGroup>

**Response:**

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

***

## Important notes

<Note>
  * You can only hide replies to conversations **you started**
  * Hidden replies are still visible via "View hidden replies"
  * The reply author is not notified when their reply is hidden
</Note>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Manage by topic" icon="tags" href="/x-api/posts/hide-replies/integrate/manage-replies-by-topic">
    Moderate replies based on content
  </Card>

  <Card title="Real-time moderation" icon="bolt" href="/x-api/posts/hide-replies/integrate/manage-replies-in-realtime">
    Moderate replies as they arrive
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/posts/hide-reply">
    Full endpoint documentation
  </Card>
</CardGroup>
