Skip to content
Twexapi
English
Esc
↑↓navigate↵open⌘Jpreview

Send a Delegate Invitation

Invite another X account to act as the account identified by cookie. Give the invitee as username or user_id; role is Admin (default) or Contributor. On success the response is the invitee’s membership with status Pending, and the invitee accepts it with the accept endpoint using its own cookie. A missing invitee, an unknown user, inviting the account itself, or an invitation X rejects (for example BadRequest: DELEGATE_ERR_002) returns HTTP 400 with the reason. Requires a TwexAPI Bearer key and the inviting account’s authorized X cookie or auth_token.

Back to API Reference
/Delegate Endpoints
POST/twitter/delegate/invite
Authorization
AuthorizationBearer token · headerrequired
Global API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Request Body
requiredapplication/json
cookiestringrequired
Authorized X session cookie or auth_token for the account sending the invitation. Required in addition to the TwexAPI Bearer key.
min length 1
proxystring | any
Show properties
Any of:
string
string
any
any
usernamestring | any
Show properties
Any of:
string
string
any
any
user_idstring | any
Show properties
Any of:
string
string
any
any
rolestring | any
Role to grant. Defaults to Admin.
default: "Admin"
Show properties
Any of:
string
string
any
any
Responses
200Success
codeintegerrequired
msgstringrequired
dataDelegateMemberrequired
Show properties
user_idstringrequired
screen_namestringrequired
namestringrequired
avatarstring | anyrequired
Profile image URL.
Show properties
Any of:
string
string
any
any
membership_idstring | anyrequired
ID of this membership in the delegation group.
Show properties
Any of:
string
string
any
any
rolestring | anyrequired
Admin or Contributor.
Show properties
Any of:
string
string
any
any
statusstring | anyrequired
Accepted, or Pending while the invitation is not yet accepted.
Show properties
Any of:
string
string
any
any
400BadRequest: DELEGATE_ERR_002
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
403Authentication or credit access denied
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
422Invalid request
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
500Upstream or server error
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
⚡Interactive ConsolePOST
⚡Interactive Console / Try APIPOST
Live Console
🌐Target Server:https://api.twexapi.io
● Production Ready
✍️
Write Operation Credentials Guide (TwexAPI Key + Twitter Cookie)

1. TwexAPI Platform Key (Bearer Token): Enter under "API Authorization" below for request billing & authentication.

2. Twitter Account Cookie: For write operations (tweet, like, follow, etc.), provide the target Twitter account's Cookie (e.g. auth_token=...; ct0=...) in the cookie field of Request Body below.

🔑API Authorization
📝Request Bodyapplication/json
📡
No Response Yet

Configure parameters in the Request tab and click Send Request below.

Request
curl -X POST "https://api.twexapi.io/twitter/delegate/invite" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
  "username": "example_member",
  "role": "Admin"
}'
Response
{
  "code": 200,
  "msg": "success",
  "data": {
    "user_id": "1234567890123456790",
    "screen_name": "example_member",
    "name": "Example Member",
    "avatar": "https://pbs.twimg.com/profile_images/example_normal.jpg",
    "membership_id": "1234567890123456791",
    "role": "Admin",
    "status": "Pending"
  }
}