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

# Bookmarks

> Bookmarks 엔드포인트를 사용하면 인증된 사용자의 북마크된 게시물을 조회, 추가, 삭제할 수 있습니다. Bookmarks를 다루는 X API v2 standard 티어 레퍼런스입니다.

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

Bookmarks 엔드포인트를 사용하면 인증된 사용자의 북마크된 게시물을 조회, 추가, 삭제할 수 있습니다. 북마크는 비공개이며, 이를 생성한 사용자에게만 표시됩니다.

## 개요

<CardGroup cols={2}>
  <Card title="북마크 조회" icon="bookmark">
    모든 북마크된 게시물 가져오기
  </Card>

  <Card title="북마크 추가" icon="plus">
    게시물 북마크하기
  </Card>

  <Card title="북마크 삭제" icon="minus">
    북마크된 게시물 삭제하기
  </Card>

  <Card title="북마크 폴더" icon="folder">
    북마크를 폴더로 정리하기
  </Card>
</CardGroup>

***

## 엔드포인트

| Method | Endpoint                                                                               | Description   |
| :----- | :------------------------------------------------------------------------------------- | :------------ |
| GET    | [`/2/users/:id/bookmarks`](/x-api/users/get-bookmarks)                                 | 사용자의 북마크 가져오기 |
| POST   | [`/2/users/:id/bookmarks`](/x-api/users/create-bookmark)                               | 게시물 북마크하기     |
| DELETE | [`/2/users/:id/bookmarks/:tweet_id`](/x-api/users/delete-bookmark)                     | 북마크 삭제하기      |
| GET    | [`/2/users/:id/bookmarks/folders`](/x-api/users/get-bookmark-folders)                  | 북마크 폴더 가져오기   |
| GET    | [`/2/users/:id/bookmarks/folders/:folder_id`](/x-api/users/get-bookmarks-by-folder-id) | 폴더 내 게시물 가져오기 |

***

## 예시: 북마크 가져오기

```bash theme={null}
curl "https://api.x.com/2/users/123456789/bookmarks?\
tweet.fields=created_at,author_id,public_metrics" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

## 예시: 북마크 추가하기

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

***

## 시작하기

<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) 또는 [3-legged OAuth](/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow)를 통해 얻은 User Access Token
</Note>

<CardGroup cols={2}>
  <Card title="조회 퀵스타트" icon="bookmark" href="/x-api/posts/bookmarks/quickstart/bookmarks-lookup">
    사용자의 북마크 가져오기
  </Card>

  <Card title="관리 퀵스타트" icon="plus" href="/x-api/posts/bookmarks/quickstart/manage-bookmarks">
    북마크 추가 및 삭제
  </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/posts/bookmarks/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-bookmarks" width="24" height="24" data-path="icons/xds/icon-code.svg">
    전체 엔드포인트 문서
  </Card>
</CardGroup>
