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

# Pinned Lists

> Pinned Lists エンドポイントを使うと、認証済みユーザーの List の表示、ピン留め、ピン留め解除ができます。X API v2 スタンダード階層の pinned lists に関するリファレンスドキュメントです。

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

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

## 概要

<CardGroup cols={2}>
  <Card title="ピン留めを表示" icon="thumbtack">
    ユーザーのピン留めした List を取得
  </Card>

  <Card title="List をピン留め" icon="plus">
    List をピン留め
  </Card>

  <Card title="List のピン留めを解除" icon="minus">
    List のピン留めを解除
  </Card>
</CardGroup>

***

## エンドポイント

| Method | Endpoint                                                        | Description     |
| :----- | :-------------------------------------------------------------- | :-------------- |
| GET    | [`/2/users/:id/pinned_lists`](/x-api/users/get-pinned-lists)    | ピン留めした List を取得 |
| POST   | [`/2/users/:id/pinned_lists`](/x-api/users/pin-list)            | List をピン留め      |
| DELETE | [`/2/users/:id/pinned_lists/:list_id`](/x-api/users/unpin-list) | List のピン留めを解除   |

***

## 例: ピン留めした List を取得

```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"
```

## 例: List をピン留め

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

***

## はじめに

<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="Lookup クイックスタート" icon="thumbtack" href="/x-api/lists/pinned-lists/quickstart/pinned-list-lookup">
    ピン留めした List を取得
  </Card>

  <Card title="管理クイックスタート" icon="plus" href="/x-api/lists/pinned-lists/quickstart/manage-pinned-lists">
    List のピン留め・解除
  </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/lists/pinned-lists/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-pinned-lists" width="24" height="24" data-path="icons/xds/icon-code.svg">
    エンドポイントの詳細ドキュメント
  </Card>
</CardGroup>
