X Write
Create tweet
Post tweets and replies from a connected X account with public image URLs or 1 MP4 video URL, write-status polling, and audit handoff
POST
Create tweet
Documentation Index
Fetch the complete documentation index at: https://docs.xquik.com/llms.txt
Use this file to discover all available pages before exploring further.
10 credits text-only · attached media adds 2 credits per started MB across all files
media; when POST /x/media hosts a local file, use the returned mediaUrl here, not mediaId. Do not send media_ids to this endpoint. Store tweetId on 200 Success, or store writeActionId and poll when the response is 202 x_write_unconfirmed.
Post with public media URLs
Usemedia when your image or MP4 video is already a public HTTPS URL or when Upload Media returned mediaUrl. Send up to 4 image URLs or exactly 1 MP4 video URL up to 100 MB. Do not send media_ids; that field is for DMs only. Attached media adds 2 credits per started MB across all files.
tweetId, charged, and chargedCredits on a 200 Success response. If the API returns 202 x_write_unconfirmed, store writeActionId, poll Get Write Action Status, and do not retry-send the same body. Keep reply_to_tweet_id and media in your downstream record.
Headers
Your API key. Session cookie authentication is also supported.
Must be
application/json.Body
X username or account ID identifying which connected X account to post as. The
@ prefix is automatically stripped if included.Tweet text content. Maximum 280 characters for standard tweets, or up to 25,000 characters if
is_note_tweet is true. Optional when media is provided.Tweet ID to reply to. When set, the new tweet is posted as a reply in that tweet’s thread.
URL to attach to the tweet as a card. Must be a valid HTTP or HTTPS URL.
X Community ID to post the tweet into. The connected account must be a member of the community.
Set to
true to post a long-form note tweet (up to 25,000 characters). Defaults to false.Array of public media URLs to attach directly. Send up to 4 JPEG, PNG, GIF, WebP, or AVIF image URLs, or exactly 1 MP4 video URL up to 100 MB. Do not mix video with other media. Use Upload Media first if you need Xquik to host a local file, then pass the returned
mediaUrl in media. Do not pass uploaded mediaId values or media_ids. Attached media adds 2 credits per started MB across all files.Response
- 200 Success
- 202 Pending Confirmation
- 400 Invalid Input
- 400 Unsupported Field
- 401 Unauthenticated
- 402 Subscription Required
- 402 Insufficient Credits
- 403 Account Needs Reauth
- 403 Account Restricted
- 422 Write Rejected
- 429 Rate Limited
- 503 Transient Error
- 500 Write Failed
ID of the newly created tweet.
Always
true on success.Whether credits were charged for the confirmed write.
Credits charged for this tweet. Text-only tweets cost 10 credits; attached media adds 2 credits per started MB.
Write action ID when the write was logged for later reconciliation.
Store the post handoff
Store a compact record after every tweet or reply so queues, CRMs, support tools, and agents can reconcile the write without scraping the timeline.- Posted
- Pending Confirmation
tweetId from the response into tweet_id. Keep reply_to_tweet_id when the post is a reply, and store chargedCredits as charged_credits. Store the public media URLs you sent in media. If you uploaded first, store the returned mediaUrl, not the upload mediaId.Next steps: Upload Media to get a
mediaUrl for a local file, Get Write Action Status to poll pending confirmations, Delete Tweet to remove a posted tweet, Like or Retweet to engage with tweets.Last modified on May 23, 2026
Create tweet