Skip to content
Twexapi
English
Esc
navigateopen⌘Jpreview

Create a Tweet or Reply

Posts a new tweet. To create a reply, provide the reply_tweet_id. This endpoint does not handle quote tweets,$0.0005 per call.

Back to API Reference
/Tweet Actions Endpoints
POST/twitter/tweets/create
Authorization
AuthorizationBearer token · headerrequired
Global API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Request Body
requiredapplication/json
media_urlstring | any
Single media URL: image, GIF, or video. Prefer media_urls for multiple images.
Show properties
Any of:
string
string
any
any
media_urlsstring[] | any
Media URLs to attach (max 4 images, or 1 GIF, or 1 video). Cannot mix GIF/video with other media.
Show properties
Any of:
string[]
Array of string
string
any
any
tweet_contentstringrequired
Content of the tweet to post
delegated_account_usernamestring | any
delegated account username
Show properties
Any of:
string
string
any
any
schedulestring | any
Schedule time for the tweet in ISO format
Show properties
Any of:
string
string
any
any
reply_tweet_idstring | any
ID of tweet to reply to
Show properties
Any of:
string
string
any
any
cookiestringrequired
The user's own authorized Twitter session credentials or auth_token (BYOC — Bring Your Own Cookie). Stateless proxy execution with zero credential retention. See [Authentication Security](/authentication#write-operations--byoc-bring-your-own-cookie) and [How to get Cookie](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie).
community_namestring | any
Name of Twitter community to post in or community id
Show properties
Any of:
string
string
any
any
proxystring | any
The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://app.proxy-cheap.com/r/qiMxub
Show properties
Any of:
string
string
any
any
Responses
200The ID and user ID of the newly created tweet.
codeinteger
HTTP status code
default: 200
msgstring
Response message
default: "success"
dataPostTweetData | any
Posted tweet information
Show properties
Any of:
PostTweetData
tweet_idstring | any
Posted tweet ID
Show properties
Any of:
string
string
any
any
user_idstring | any
User ID who posted
Show properties
Any of:
string
string
any
any
codeinteger
HTTP status code
default: 200
any
any
422Validation Error
detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
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/tweets/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "media_url": "https://example.com/image.jpg",
  "media_urls": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "tweet_content": "Hello, Twitter! 🐦",
  "delegated_account_username": "elonmusk",
  "schedule": "2024-01-01T12:00:00Z",
  "reply_tweet_id": "1234567890123456789",
  "cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
  "community_name": "Python Developers or 1234567890123456789",
  "proxy": "http://username:password@ip:port"
}'
Response
{
  "code": 200,
  "msg": "success",
  "data": {
    "tweet_id": "1234567890123456789",
    "user_id": "1234567890",
    "code": 200
  }
}