Skip to main content
POST
/
x
/
tweets
Create tweet
curl --request POST \
  --url https://xquik.com/api/v1/x/tweets \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "account": "<string>",
  "text": "<string>",
  "reply_to_tweet_id": "<string>",
  "attachment_url": "<string>",
  "community_id": "<string>",
  "is_note_tweet": true,
  "media": [
    "<string>"
  ]
}
'

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
Create a tweet or reply from one connected X account. Put public HTTPS image URLs or one public MP4 URL in 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.
curl -X POST https://xquik.com/api/v1/x/tweets \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "elonmusk",
    "text": "Hello from Xquik!"
  }' | jq

Post with public media URLs

Use media 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.
curl -X POST https://xquik.com/api/v1/x/tweets \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "brand_account",
    "text": "Launch notes are live.",
    "media": ["https://cdn.example.com/product-screenshot.png"]
  }' | jq
Store 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

x-api-key
string
required
Your API key. Session cookie authentication is also supported.
Content-Type
string
required
Must be application/json.

Body

account
string
required
X username or account ID identifying which connected X account to post as. The @ prefix is automatically stripped if included.
text
string
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.
reply_to_tweet_id
string
Tweet ID to reply to. When set, the new tweet is posted as a reply in that tweet’s thread.
attachment_url
string
URL to attach to the tweet as a card. Must be a valid HTTP or HTTPS URL.
community_id
string
X Community ID to post the tweet into. The connected account must be a member of the community.
is_note_tweet
boolean
Set to true to post a long-form note tweet (up to 25,000 characters). Defaults to false.
media
string[]
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

tweetId
string
ID of the newly created tweet.
success
boolean
Always true on success.
charged
boolean
Whether credits were charged for the confirmed write.
chargedCredits
string
Credits charged for this tweet. Text-only tweets cost 10 credits; attached media adds 2 credits per started MB.
writeActionId
string
Write action ID when the write was logged for later reconciliation.
{
  "tweetId": "1895432178065391234",
  "success": true,
  "charged": true,
  "chargedCredits": "12"
}

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.
{
  "status": "posted",
  "tweet_id": "1895432178065391234",
  "account": "brand_account",
  "reply_to_tweet_id": "1893456789012345678",
  "media": ["https://cdn.example.com/release-card.png"],
  "charged": true,
  "charged_credits": "12",
  "media_credits": "2"
}
Copy 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