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

> The Bookmarks endpoints let you view, add, and remove bookmarked Posts for the authenticated. Reference for the X API v2 standard tier covering bookmarks.

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

The Bookmarks endpoints let you view, add, and remove bookmarked Posts for the authenticated user. Bookmarks are private and only visible to the user who created them.

## Overview

<CardGroup cols={2}>
  <Card title="View bookmarks" icon="bookmark">
    Get all bookmarked Posts
  </Card>

  <Card title="Add bookmark" icon="plus">
    Bookmark a Post
  </Card>

  <Card title="Remove bookmark" icon="minus">
    Remove a bookmarked Post
  </Card>

  <Card title="Bookmark folders" icon="folder">
    Organize bookmarks into folders
  </Card>
</CardGroup>

***

## Endpoints

| Method | Endpoint                                                                               | Description           |
| :----- | :------------------------------------------------------------------------------------- | :-------------------- |
| GET    | [`/2/users/:id/bookmarks`](/x-api/users/get-bookmarks)                                 | Get user's bookmarks  |
| POST   | [`/2/users/:id/bookmarks`](/x-api/users/create-bookmark)                               | Bookmark a Post       |
| DELETE | [`/2/users/:id/bookmarks/:tweet_id`](/x-api/users/delete-bookmark)                     | Remove a bookmark     |
| GET    | [`/2/users/:id/bookmarks/folders`](/x-api/users/get-bookmark-folders)                  | Get bookmark folders  |
| GET    | [`/2/users/:id/bookmarks/folders/:folder_id`](/x-api/users/get-bookmarks-by-folder-id) | Get Posts in a folder |

***

## Example: Get bookmarks

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

## Example: Add bookmark

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

***

## Getting started

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * User Access Tokens via [OAuth 2.0 PKCE](/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2) or [3-legged OAuth](/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow)
</Note>

<CardGroup cols={2}>
  <Card title="Lookup quickstart" icon="bookmark" href="/x-api/posts/bookmarks/quickstart/bookmarks-lookup">
    Get a user's bookmarks
  </Card>

  <Card title="Manage quickstart" icon="plus" href="/x-api/posts/bookmarks/quickstart/manage-bookmarks">
    Add and remove bookmarks
  </Card>

  <Card title="Integration guide" icon="book" href="/x-api/posts/bookmarks/integrate">
    Key concepts and best practices
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/users/get-bookmarks">
    Full endpoint documentation
  </Card>
</CardGroup>
