Skip to main content
POST
Create or Edit Post
Quote-posting (using the quote_tweet_id parameter) requires an Enterprise plan. It is not available on self-serve (pay-per-use) tiers.

Media attachments

Upload media first with the chunked upload endpoints, then pass the returned media_id in media.media_ids. A Post may include up to 4 photos, 1 animated GIF, or 1 video. Duration and file size are checked again at Post create. They follow the posting user’s X Premium / verified status and the media_category used at upload — not your developer API plan. These caps apply to tweet_video and amplify_video. If the video is longer than that user is allowed to post, the response is 403 Forbidden:
A successful upload does not guarantee the media can be attached. See size and duration limits.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Scopes

users.read

View any account you can see, including protected accounts.

tweet.write

Create and repost on your behalf.

tweet.read

View all posts you can see, including those from protected accounts.

Body

application/json
card_uri
string

Card URI parameter.

clip
object

Clip of another Post's video to share. Cannot be combined with media, a poll, a card, a quoted Post or a direct message deep link.

community_id
string

Community to post the tweet to.

Pattern: ^[0-9]{1,19}$

Direct message deep link.

edit_options
object

Edit an existing tweet rather than creating a new one.

for_super_followers_only
boolean

Restrict tweet to super followers.

geo
object

Geo location for the tweet.

made_with_ai
boolean

Disclose that the tweet contains AI-generated media.

media
object

Media attachments.

nullcast
boolean

If true, the tweet is not shown in the public timeline.

paid_partnership
boolean

Disclose that the tweet is a paid partnership.

poll
object

Poll configuration.

quote_tweet_id
string

Tweet ID to quote.

Pattern: ^[0-9]{1,19}$
reply
object

Tweet reply configuration.

reply_settings
enum<string>

Who can reply to this tweet.

Available options:
following,
mentionedUsers,
subscribers,
verified
share_with_followers
boolean

Share an exclusive (super-follower) tweet with all followers.

text
string
default:""

Text of the Post. Required unless media is provided. At most 280 characters unless the account has X Premium.

Response

The request has succeeded.

data
object
errors
object[]