X (Twitter) · Capability
X API v2 — Bookmarks
X API v2 — Bookmarks. 5 operations. Lead operation: X Get Bookmarks. Self-contained Naftiko capability covering one Twitter business surface.
What You Can Do
GET
Getusersbookmarks
— X Get Bookmarks
/v1/2/users/{id}/bookmarks
POST
Createusersbookmark
— X Create Bookmark
/v1/2/users/{id}/bookmarks
GET
Getusersbookmarkfolders
— X Get Bookmark Folders
/v1/2/users/{id}/bookmarks/folders
GET
Getusersbookmarksbyfolderid
— X Get Bookmarks by Folder ID
/v1/2/users/{id}/bookmarks/folders/{folder-id}
DELETE
Deleteusersbookmark
— X Delete Bookmark
/v1/2/users/{id}/bookmarks/{tweet-id}
MCP Tools
x-get-bookmarks
X Get Bookmarks
read-only
idempotent
x-create-bookmark
X Create Bookmark
x-get-bookmark-folders
X Get Bookmark Folders
read-only
idempotent
x-get-bookmarks-folder-id
X Get Bookmarks by Folder ID
read-only
idempotent
x-delete-bookmark
X Delete Bookmark
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: X API v2 — Bookmarks
description: 'X API v2 — Bookmarks. 5 operations. Lead operation: X Get Bookmarks. Self-contained Naftiko capability covering
one Twitter business surface.'
tags:
- Twitter
- Bookmarks
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
TWITTER_API_KEY: TWITTER_API_KEY
capability:
consumes:
- type: http
namespace: x-bookmarks
baseUri: https://api.x.com
description: X API v2 — Bookmarks business capability. Self-contained, no shared references.
resources:
- name: 2-users-id-bookmarks
path: /2/users/{id}/bookmarks
operations:
- name: getusersbookmarks
method: GET
description: X Get Bookmarks
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: The ID of the authenticated source User for whom to return results.
required: true
- name: max_results
in: query
type: integer
description: The maximum number of results.
- name: pagination_token
in: query
type: string
description: This parameter is used to get the next 'page' of results.
- name: createusersbookmark
method: POST
description: X Create Bookmark
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: The ID of the authenticated source User for whom to add bookmarks.
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: true
- name: 2-users-id-bookmarks-folders
path: /2/users/{id}/bookmarks/folders
operations:
- name: getusersbookmarkfolders
method: GET
description: X Get Bookmark Folders
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: The ID of the authenticated source User for whom to return results.
required: true
- name: max_results
in: query
type: integer
description: The maximum number of results.
- name: pagination_token
in: query
type: string
description: This parameter is used to get the next 'page' of results.
- name: 2-users-id-bookmarks-folders-folder_id
path: /2/users/{id}/bookmarks/folders/{folder_id}
operations:
- name: getusersbookmarksbyfolderid
method: GET
description: X Get Bookmarks by Folder ID
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: The ID of the authenticated source User for whom to return results.
required: true
- name: folder_id
in: path
type: string
description: The ID of the Bookmark Folder that the authenticated User is trying to fetch Posts for.
required: true
- name: 2-users-id-bookmarks-tweet_id
path: /2/users/{id}/bookmarks/{tweet_id}
operations:
- name: deleteusersbookmark
method: DELETE
description: X Delete Bookmark
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: id
in: path
type: string
description: The ID of the authenticated source User whose bookmark is to be removed.
required: true
- name: tweet_id
in: path
type: string
description: The ID of the Post that the source User is removing from bookmarks.
required: true
authentication:
type: bearer
token: '{{env.TWITTER_API_KEY}}'
exposes:
- type: rest
namespace: x-bookmarks-rest
port: 8080
description: REST adapter for X API v2 — Bookmarks. One Spectral-compliant resource per consumed operation, prefixed with
/v1.
resources:
- path: /v1/2/users/{id}/bookmarks
name: 2-users-id-bookmarks
description: REST surface for 2-users-id-bookmarks.
operations:
- method: GET
name: getusersbookmarks
description: X Get Bookmarks
call: x-bookmarks.getusersbookmarks
with:
id: rest.id
max_results: rest.max_results
pagination_token: rest.pagination_token
outputParameters:
- type: object
mapping: $.
- method: POST
name: createusersbookmark
description: X Create Bookmark
call: x-bookmarks.createusersbookmark
with:
id: rest.id
body: rest.body
outputParameters:
- type: object
mapping: $.
- path: /v1/2/users/{id}/bookmarks/folders
name: 2-users-id-bookmarks-folders
description: REST surface for 2-users-id-bookmarks-folders.
operations:
- method: GET
name: getusersbookmarkfolders
description: X Get Bookmark Folders
call: x-bookmarks.getusersbookmarkfolders
with:
id: rest.id
max_results: rest.max_results
pagination_token: rest.pagination_token
outputParameters:
- type: object
mapping: $.
- path: /v1/2/users/{id}/bookmarks/folders/{folder-id}
name: 2-users-id-bookmarks-folders-folder-id
description: REST surface for 2-users-id-bookmarks-folders-folder_id.
operations:
- method: GET
name: getusersbookmarksbyfolderid
description: X Get Bookmarks by Folder ID
call: x-bookmarks.getusersbookmarksbyfolderid
with:
id: rest.id
folder_id: rest.folder_id
outputParameters:
- type: object
mapping: $.
- path: /v1/2/users/{id}/bookmarks/{tweet-id}
name: 2-users-id-bookmarks-tweet-id
description: REST surface for 2-users-id-bookmarks-tweet_id.
operations:
- method: DELETE
name: deleteusersbookmark
description: X Delete Bookmark
call: x-bookmarks.deleteusersbookmark
with:
id: rest.id
tweet_id: rest.tweet_id
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: x-bookmarks-mcp
port: 9090
transport: http
description: MCP adapter for X API v2 — Bookmarks. One tool per consumed operation, routed inline through this capability's
consumes block.
tools:
- name: x-get-bookmarks
description: X Get Bookmarks
hints:
readOnly: true
destructive: false
idempotent: true
call: x-bookmarks.getusersbookmarks
with:
id: tools.id
max_results: tools.max_results
pagination_token: tools.pagination_token
outputParameters:
- type: object
mapping: $.
- name: x-create-bookmark
description: X Create Bookmark
hints:
readOnly: false
destructive: false
idempotent: false
call: x-bookmarks.createusersbookmark
with:
id: tools.id
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: x-get-bookmark-folders
description: X Get Bookmark Folders
hints:
readOnly: true
destructive: false
idempotent: true
call: x-bookmarks.getusersbookmarkfolders
with:
id: tools.id
max_results: tools.max_results
pagination_token: tools.pagination_token
outputParameters:
- type: object
mapping: $.
- name: x-get-bookmarks-folder-id
description: X Get Bookmarks by Folder ID
hints:
readOnly: true
destructive: false
idempotent: true
call: x-bookmarks.getusersbookmarksbyfolderid
with:
id: tools.id
folder_id: tools.folder_id
outputParameters:
- type: object
mapping: $.
- name: x-delete-bookmark
description: X Delete Bookmark
hints:
readOnly: false
destructive: true
idempotent: true
call: x-bookmarks.deleteusersbookmark
with:
id: tools.id
tweet_id: tools.tweet_id
outputParameters:
- type: object
mapping: $.