Skip to main content
POST
/
twitter
/
tweets
/
create
Create a Tweet or Reply
curl --request POST \
  --url https://api.twitterxapi.com/twitter/tweets/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "media_url": "https://example.com/image.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",
  "proxy": "http://username:password@ip:port"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "tweet_id": "1234567890123456789",
    "user_id": "1234567890",
    "code": 200
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Parameters for posting a tweet

tweet_content
string
required

Content of the tweet to post

Maximum length: 280
Example:

"Hello, Twitter! 🐦"

Twitter authentication cookie or Twitter auth_token, how-to-get-twitter-cookie

Example:

"ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7"

media_url
string | null

URL of media to attach to the tweet

Example:

"https://example.com/image.jpg"

delegated_account_username
string | null

delegated account username

Example:

"elonmusk"

schedule
string | null

Schedule time for the tweet in ISO format

Example:

"2024-01-01T12:00:00Z"

reply_tweet_id
string | null

ID of tweet to reply to

Example:

"1234567890123456789"

community_name
string | null

Name of Twitter community to post in

Example:

"Python Developers"

proxy
string | null

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

Example:

"http://username:password@ip:port"

Response

The ID and user ID of the newly created tweet.

Post tweet API response

code
integer
default:200

HTTP status code

msg
string
default:success

Response message

data
object | null

Posted tweet information Post tweet response data