X

X Bots API

The Bots surface of the X API v2. — 6 operation(s) in the X-published contract.

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /2/bots List bots in my project · Get Bots #
Ask an LLM
“Which bot accounts exist in my app's project?”
“How can I see all the bots I've created?”
Tell an agent
List all my project's bot accounts.
Show my bots with user fields {user_fields}.
POST /2/bots Create a bot account · Create a bot #
Ask an LLM
“How do I create a bot account and get its bearer token?”
“Is it safe to retry bot creation with the same handle if the response was lost?”
Tell an agent
Create a bot with handle {handle}.
Create bot {handle} named {display_name} with scopes {scopes}.
DELETE /2/bots/{id} Delete a bot account · Delete Bot #
Ask an LLM
“What's needed to permanently remove a bot from my project?”
“What's the call to delete a bot account?”
Tell an agent destructive · confirm first
Delete bot {id}.
Remove the bot account {id} from my project.
PUT /2/bots/{id} Update a bot's handle, name or DM permission · Update Bot #
Ask an LLM
“Can I rename an existing bot or change its handle?”
“How do I control who is allowed to DM my bot?”
Tell an agent
Rename bot {id} to display name {display_name}.
Set DM permission on bot {id} to {dm_permission}.
DELETE /2/bots/{id}/token Revoke a bot's bearer token · Revoke Bot Token #
Ask an LLM
“How do I kill a leaked bot token without deleting the bot?”
“Can I revoke a bot's token so it can no longer call the API?”
Tell an agent destructive · confirm first
Revoke the token for bot {id}.
Invalidate bot {id}'s current bearer token without issuing a new one.
POST /2/bots/{id}/token Rotate a bot's bearer token · Rotate Bot Token #
Ask an LLM
“How do I issue a fresh bearer token for my bot?”
“Can I change the scopes when rotating a bot token?”
Tell an agent
Rotate the bearer token for bot {id}.
Mint a new token for bot {id} with scopes {scopes}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/x:x-bots-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

x-bots-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: X API v2 core endpoints
  version: '2.168'
  title: X API v2 Bots API
  termsOfService: https://developer.x.com/en/developer-terms/agreement-and-policy.html
  contact:
    name: X Developers
    url: https://developer.x.com/
  license:
    name: X Developer Agreement and Policy
    url: https://developer.x.com/en/developer-terms/agreement-and-policy.html
servers:
- description: X API
  url: https://api.x.com
tags:


# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/x/refs/heads/main/openapi/x-bots-api-openapi.yml