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

# Mutes

> X API v2 の Mutes エンドポイントを利用して、認証済みユーザーの代理でアカウントのミュートおよびミュート解除を行い、そのユーザーが 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>;
};

Mutes エンドポイントを使うと、ユーザーをミュート・ミュート解除したり、認証済みユーザーがミュートしているユーザーの一覧を取得したりできます。

## 概要

<CardGroup cols={2}>
  <Card title="ミュート" icon="volume-xmark">
    ユーザーをミュート
  </Card>

  <Card title="ミュート解除" icon="volume-high">
    ユーザーのミュートを解除
  </Card>

  <Card title="ミュート済みユーザー" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    ミュート中のユーザー一覧を取得
  </Card>
</CardGroup>

***

## エンドポイント

| Method | Endpoint                                                                      | Description   |
| :----- | :---------------------------------------------------------------------------- | :------------ |
| GET    | [`/2/users/:id/muting`](/x-api/users/get-muting)                              | ミュート中のユーザーを取得 |
| POST   | [`/2/users/:id/muting`](/x-api/users/mute-user)                               | ユーザーをミュート     |
| DELETE | [`/2/users/:source_user_id/muting/:target_user_id`](/x-api/users/unmute-user) | ユーザーのミュートを解除  |

***

## 例: ミュート中のユーザーを取得

```bash theme={null}
curl "https://api.x.com/2/users/123456789/muting?\
user.fields=username,description" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

## 例: ユーザーをミュート

```bash theme={null}
curl -X POST "https://api.x.com/2/users/123456789/muting" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target_user_id": "9876543210"}'
```

***

## はじめに

<Note>
  **前提条件**

  * 承認済みの [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * Developer Console 内の [Project と App](/resources/fundamentals/developer-apps)
  * [OAuth 2.0 PKCE](/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) 経由のユーザー Access Token
</Note>

<CardGroup cols={2}>
  <Card title="Mutes lookup クイックスタート" icon="https://mintcdn.com/x-preview/ygI6sSJPehlc0qNT/icons/xds/icon-bulleted-list.svg?fit=max&auto=format&n=ygI6sSJPehlc0qNT&q=85&s=b9bf8323233df59c682b0fec8e3f88d5" href="/x-api/users/mutes/quickstart/mutes-lookup" width="24" height="24" data-path="icons/xds/icon-bulleted-list.svg">
    ミュート中のユーザーを取得
  </Card>

  <Card title="Manage mutes クイックスタート" icon="volume-xmark" href="/x-api/users/mutes/quickstart/manage-mutes-quickstart">
    ユーザーのミュート・解除
  </Card>

  <Card title="連携ガイド" icon="https://mintcdn.com/x-preview/Vn2KEkZaPF9LiPi3/icons/xds/icon-book.svg?fit=max&auto=format&n=Vn2KEkZaPF9LiPi3&q=85&s=22ac564792481d14ae36a941546039c8" href="/x-api/users/mutes/integrate" width="24" height="24" data-path="icons/xds/icon-book.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/users/get-muting" width="24" height="24" data-path="icons/xds/icon-code.svg">
    エンドポイントの詳細ドキュメント
  </Card>
</CardGroup>
