Skip to main content
POST
/
twitter
/
create_tweet_v2
cURL
curl --request POST \
  --url https://api.twitterapi.io/twitter/create_tweet_v2 \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "login_cookies": "<string>",
  "tweet_text": "<string>",
  "reply_to_tweet_id": "<string>",
  "attachment_url": "<string>",
  "community_id": "<string>",
  "is_note_tweet": true,
  "media_ids": [
    "<any>"
  ],
  "proxy": "<string>"
}'
{
  "tweet_id": "<string>",
  "status": "<string>",
  "msg": "<string>"
}

Authorizations

X-API-Key
string
header
required

Body

application/json
login_cookies
string
required

The login cookies of the user.You can get the login_cookie from /twitter/user_login_v2.Must be set

tweet_text
string
required

The text of the tweet.Must be set

proxy
string
required

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://www.webshare.io/?referral_code=4e0q1n00a504

reply_to_tweet_id
string

The id of the tweet to reply to.Optional

attachment_url
string

The url of quote tweet.Optional.eg.https://x.com/sama/status/1947640330318156074

community_id
string

The id of the community to post to.Optional

is_note_tweet
boolean

If this option is set to True, tweets longer than 280 characters can be posted (Twitter Premium only).

media_ids
any[]

The ids of the media to post.Optional.You can get the media_ids from /twitter/upload_image_v2 (to be developed)

Response

Login response

tweet_id
string

The id of the created tweet.

status
string

Status of the request.success or error

msg
string

Message of the request.error message