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

# ピン留めされたリスト

> ピン留めされたリストの表示と管理

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

Pinned Lists エンドポイントを使用すると、認証済みのユーザーのリストを表示、ピン留め、およびピン留め解除できます。ピン留めされたリストは、そのユーザーの X インターフェース上で目立つ位置に表示されます。

<div id="overview">
  ## 概要
</div>

<CardGroup cols={2}>
  <Card title="固定済みリストを表示" icon="thumbtack">
    ユーザーの固定済みリストを取得する
  </Card>

  <Card title="リストを固定" icon="plus">
    リストを固定する
  </Card>

  <Card title="リストの固定を解除" icon="minus">
    リストの固定を解除する
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## エンドポイント
</div>

| Method | Endpoint                                                           | Description   |
| :----- | :----------------------------------------------------------------- | :------------ |
| GET    | [`/2/users/:id/pinned_lists`](/ja/x-api/users/get-pinned-lists)    | ピン留めされたリストを取得 |
| POST   | [`/2/users/:id/pinned_lists`](/ja/x-api/users/pin-list)            | リストをピン留めする    |
| DELETE | [`/2/users/:id/pinned_lists/:list_id`](/ja/x-api/users/unpin-list) | リストのピン留めを外す   |

***

<div id="example-get-pinned-lists">
  ## 例：固定されたリストを取得する
</div>

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

<div id="example-pin-a-list">
  ## 例：リストをピン留めする
</div>

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

***

<div id="getting-started">
  ## はじめに
</div>

<Note>
  **前提条件**

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

<CardGroup cols={2}>
  <Card title="Lookup クイックスタート" icon="thumbtack" href="/ja/x-api/lists/pinned-lists/quickstart/pinned-list-lookup">
    ピン留めされたリストの取得
  </Card>

  <Card title="Manage クイックスタート" icon="plus" href="/ja/x-api/lists/pinned-lists/quickstart/manage-pinned-lists">
    リストのピン留め／ピン留め解除
  </Card>

  <Card title="Integration ガイド" icon="book" href="/ja/x-api/lists/pinned-lists/integrate">
    主要な概念とベストプラクティス
  </Card>

  <Card title="APIリファレンス" icon="code" href="/ja/x-api/lists/pinned-lists-lookup">
    エンドポイントの完全なドキュメント
  </Card>
</CardGroup>
