Skip to main content
This guide walks you through adding and removing bookmarks using the X API.
PrerequisitesBefore you begin, you’ll need:
  • A developer account with an approved App
  • User Access Token with bookmark.write scope (OAuth 2.0 PKCE)

Add a bookmark

1

Get your user ID

You need your authenticated user’s ID. You can find it using the /2/users/me endpoint or the user lookup endpoint.
2

Get the Post ID

Find the Post ID in the URL when viewing a Post:
3

Add the bookmark

cURL
4

Review the response


Remove a bookmark

Delete a Post from your bookmarks:
cURL
Response:

Required scopes

When using OAuth 2.0 PKCE, your access token must have these scopes:

Next steps

Bookmarks lookup

Get your bookmarked Posts

API Reference

Full endpoint documentation