X (Twitter) General API

Miscellaneous endpoints for general API functionality

OpenAPI Specification

twitter-general-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: X API v2 available endpoints
  version: '2.161'
  title: X API v2 Account Activity General 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:
- name: General
  description: Miscellaneous endpoints for general API functionality
  externalDocs:
    description: Find out more
    url: https://developer.twitter.com/en/docs/twitter-api
paths:
  /2/openapi.json:
    get:
      tags:
      - General
      summary: X Get OpenAPI Spec.
      description: Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)
      operationId: getOpenApiSpec
      parameters: []
      responses:
        '200':
          description: The request was successful
          content:
            application/json:
              schema:
                type: object
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
    OAuth2UserToken:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.x.com/2/oauth2/authorize
          tokenUrl: https://api.x.com/2/oauth2/token
          scopes:
            block.read: View accounts you have blocked.
            bookmark.read: Read your bookmarked Posts.
            bookmark.write: Create and delete your bookmarks.
            dm.read: Read all your Direct Messages.
            dm.write: Send and manage your Direct Messages.
            follows.read: View accounts you follow and accounts following you.
            follows.write: Follow and unfollow accounts on your behalf.
            like.read: View Posts you have liked and likes you can see.
            like.write: Like and unlike Posts on your behalf.
            list.read: View Lists, members, and followers of Lists you created or are a member of, including private Lists.
            list.write: Create and manage Lists on your behalf.
            media.write: Upload media, such as photos and videos, on your behalf.
            mute.read: View accounts you have muted.
            mute.write: Mute and unmute accounts on your behalf.
            offline.access: Request a refresh token for the app.
            space.read: View all Spaces you have access to.
            timeline.read: View all Custom Timelines you can see, including public Custom Timelines from other developers.
            tweet.moderate.write: Hide and unhide replies to your Posts.
            tweet.read: View all Posts you can see, including those from protected accounts.
            tweet.write: Post and repost on your behalf.
            users.read: View any account you can see, including protected accounts.
    UserToken:
      type: http
      scheme: OAuth