twexapi-io Delegate Endpoints API

The Delegate Endpoints API from twexapi-io — 2 operation(s) for delegate endpoints.

Operations 2

POST /twitter/delegate/invites Get Pending Delegate Invitations #
POST /twitter/delegate/accept Accept a Delegate Invitation #

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/twexapi-io:twexapi-io-delegate-endpoints-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

twexapi-io-delegate-endpoints-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TwexAPI REST Delegate Endpoints API
  description: 'TwexAPI exposes a REST API at `https://api.twexapi.io` for X/Twitter search, profiles, followers, posting, DMs, and agent integrations.


    **Capabilities include:**


    * **Search** — Advanced search, hashtags, cashtags

    * **Tweets** — Post, like, retweet, quote, bookmark, delete

    * **Users** — Batch user information retrieval

    * **Influencers** — Get tweets from top influencers


    All endpoints return a consistent envelope with `code`, `msg`, and `data` fields. See Error Handling for status codes and recovery.


    ## Authentication


    Send your API key on every request:


    ```txt

    Authorization: Bearer YOUR_API_KEY

    ```


    Write actions also require a Twitter cookie or `auth_token`. See Authentication for setup examples.'
  contact:
    name: TwexAPI Support
    email: support@twexapi.io
  license:
    name: MIT
  version: 1.0.0
servers:
- url: https://api.twexapi.io
  description: Development server
tags:
- name: Delegate Endpoints
paths:
  /twitter/delegate/invites:
    post:
      tags:
      - Delegate Endpoints
      summary: Get Pending Delegate Invitations
      description: List pending account-delegation invitations received by the account identified by cookie. Requires both a TwexAPI Bearer key and the recipient account’s authorized X cookie or auth_token. Returns an empty array when no pending invitations are found. username and membership_id do not filter this list. This read operation requires account credentials because invitations are private.
      operationId: delegate_invites
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegateInvitesBody'
            example:
              cookie: YOUR_X_COOKIE_OR_AUTH_TOKEN
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegateInvitesResponse'
              example:
                code: 200
                msg: success
                data: []
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 422
                msg: Invalid request
                data: []
        '403':
          description: Authentication or credit access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 403
                msg: Authentication or credit access denied
                data: []
        '500':
          description: Upstream or server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 500
                msg: Upstream or server error
                data: []
  /twitter/delegate/accept:
    post:
      tags:
      - Delegate Endpoints
      summary: Accept a Delegate Invitation
      description: Accept a pending invitation for the account identified by cookie. Use membership_id from the invitations endpoint or username of the inviting account. A non-empty membership_id takes precedence over username, with no username fallback if the ID is not found. If neither selector is provided, acceptance occurs only when exactly one invitation is pending. No match, no invitations, or multiple invitations without a selector returns HTTP 500 in the current implementation. Success returns the selected invitation metadata. Requires a TwexAPI Bearer key and the recipient account’s authorized X credentials.
      operationId: delegate_accept
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegateAcceptBody'
            example:
              cookie: YOUR_X_COOKIE_OR_AUTH_TOKEN
              membership_id: '1234567890123456789'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DelegateAcceptResponse'
              example:
                code: 200
                msg: success
                data:
                  membership_id: '1234567890123456789'
                  role: Contributor
                  screen_name: example_owner
                  name: Example Owner
                  user_id: '1234567890123456788'
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 422
                msg: Invalid request
                data: []
        '403':
          description: Authentication or credit access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 403
                msg: Authentication or credit access denied
                data: []
        '500':
          description: Upstream or server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NodeApiError'
              example:
                code: 500
                msg: Upstream or server error
                data: null
components:
  schemas:
    DelegateAcceptBody:
      type: object
      properties:
        cookie:
          type: string
          description: Authorized X session cookie or auth_token for the account receiving the invitation. Required in addition to the TwexAPI Bearer key.
          minLength: 1
        proxy:
          anyOf:
          - type: string
            description: Optional HTTP proxy URL.
          - type: 'null'
        username:
          anyOf:
          - type: string
            description: Inviting account username, @handle or X profile URL. Matched case-insensitively.
          - type: 'null'
        membership_id:
          anyOf:
          - type: string
            description: Pending invitation membership ID. Takes precedence over username when non-empty.
          - type: 'null'
      required:
      - cookie
    DelegateInvitesResponse:
      type: object
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/DelegateInvite'
      required:
      - code
      - msg
      - data
    DelegateAcceptResponse:
      type: object
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          $ref: '#/components/schemas/DelegateInvite'
      required:
      - code
      - msg
      - data
    DelegateInvite:
      type: object
      properties:
        membership_id:
          type: string
        role:
          type: string
        screen_name:
          type: string
          description: Username of the account that sent the delegation invitation.
        name:
          type: string
        user_id:
          type: string
      required:
      - membership_id
      - role
      - screen_name
      - name
      - user_id
    DelegateInvitesBody:
      type: object
      properties:
        cookie:
          type: string
          description: Authorized X session cookie or auth_token for the account receiving the invitation. Required in addition to the TwexAPI Bearer key.
          minLength: 1
        proxy:
          anyOf:
          - type: string
            description: Optional HTTP proxy URL.
          - type: 'null'
        username:
          anyOf:
          - type: string
            description: Accepted for compatibility; ignored by the list operation.
          - type: 'null'
        membership_id:
          anyOf:
          - type: string
            description: Accepted for compatibility; ignored by the list operation.
          - type: 'null'
      required:
      - cookie
    NodeApiError:
      type: object
      properties:
        code:
          type: integer
        msg:
          type: string
        data:
          anyOf:
          - type: array
            items: {}
          - type: 'null'
      required:
      - code
      - msg
      - data
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer