Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

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 'Idempotency-Key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "account": "<string>",
  "text": "<string>",
  "reply_to_tweet_id": "<string>",
  "community_id": "<string>",
  "is_note_tweet": true,
  "media": [
    "<string>"
  ]
}
'
import requests

url = "https://xquik.com/api/v1/x/tweets"

payload = {
"account": "<string>",
"text": "<string>",
"reply_to_tweet_id": "<string>",
"community_id": "<string>",
"is_note_tweet": True,
"media": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "<content-type>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-api-key': '<api-key>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
account: '<string>',
text: '<string>',
reply_to_tweet_id: '<string>',
community_id: '<string>',
is_note_tweet: true,
media: ['<string>']
})
};

fetch('https://xquik.com/api/v1/x/tweets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://xquik.com/api/v1/x/tweets"

payload := strings.NewReader("{\n \"account\": \"<string>\",\n \"text\": \"<string>\",\n \"reply_to_tweet_id\": \"<string>\",\n \"community_id\": \"<string>\",\n \"is_note_tweet\": true,\n \"media\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Content-Type", "<content-type>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "object": "<string>",
  "id": "<string>",
  "writeActionId": "<string>",
  "action": "<string>",
  "status": "<string>",
  "terminal": true,
  "retryable": true,
  "safeToRetry": true,
  "statusUrl": "<string>",
  "pollAfterMs": {},
  "charged": true,
  "chargedCredits": "<string>",
  "billing": {},
  "request": {},
  "account": {},
  "target": {},
  "targetId": {},
  "result": {},
  "nextAction": {},
  "requestHash": "<string>",
  "requestId": "<string>",
  "idempotent": true,
  "error": "<string>",
  "message": "<string>",
  "sendDispatched": true,
  "sendDispatchedAt": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "completedAt": "<string>",
  "expiresAt": "<string>",
  "confirmedAt": "<string>",
  "confirmationCheckedAt": "<string>",
  "confirmationAttempts": 123,
  "tweetId": "<string>",
  "messageId": "<string>",
  "mediaId": "<string>",
  "mediaUrl": "<string>",
  "communityId": "<string>",
  "communityName": "<string>",
  "resultId": "<string>",
  "media": {},
  "details": {},
  "success": true
}
30 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. Send a unique Idempotency-Key, store the durable action, and poll statusUrl while terminal is false.
curl -X POST https://xquik.com/api/v1/x/tweets \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Idempotency-Key: tweet-1895432178065391234" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "elonmusk",
    "text": "Hello from Xquik!"
  }' | jq
const response = await fetch("https://xquik.com/api/v1/x/tweets", {
  method: "POST",
  headers: {
    "x-api-key": "xq_YOUR_KEY_HERE",
    "Idempotency-Key": "tweet-1895432178065391234",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account: "elonmusk",
    text: "Hello from Xquik!",
  }),
});
const result = await response.json();
if (!response.ok) {
  throw new Error(JSON.stringify(result));
}
const postRecord = {
  status: result.status,
  terminal: result.terminal,
  safe_to_retry: result.safeToRetry,
  write_action_id: result.id,
  request_hash: result.request.hash,
  tweet_id: result.result?.id ?? result.tweetId ?? null,
  account: result.account,
  target: result.target,
  charged: result.billing.charged,
  charged_credits: result.billing.chargedCredits,
  poll_path: result.terminal ? null : result.statusUrl,
};
process.stdout.write(`${JSON.stringify(postRecord)}\n`);
import requests
import json

response = requests.post(
    "https://xquik.com/api/v1/x/tweets",
    headers={
        "x-api-key": "xq_YOUR_KEY_HERE",
        "Idempotency-Key": "tweet-1895432178065391234",
    },
    json={
        "account": "elonmusk",
        "text": "Hello from Xquik!",
    },
)
result = response.json()
response.raise_for_status()
post_record = {
    "status": result["status"],
    "terminal": result["terminal"],
    "safe_to_retry": result["safeToRetry"],
    "write_action_id": result["id"],
    "request_hash": result["request"]["hash"],
    "tweet_id": (result.get("result") or {}).get("id") or result.get("tweetId"),
    "account": result["account"],
    "target": result["target"],
    "charged": result["billing"]["charged"],
    "charged_credits": result["billing"]["chargedCredits"],
    "poll_path": None if result["terminal"] else result["statusUrl"],
}
print(json.dumps(post_record))
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

type CreateTweetResponse struct {
    ID string `json:"id"`
    TweetID string `json:"tweetId"`
    Status string `json:"status"`
    Terminal bool `json:"terminal"`
    SafeToRetry bool `json:"safeToRetry"`
    StatusURL string `json:"statusUrl"`
    Request struct { Hash *string `json:"hash"` } `json:"request"`
    Billing struct {
        Charged bool `json:"charged"`
        ChargedCredits string `json:"chargedCredits"`
    } `json:"billing"`
    Result *struct { ID string `json:"id"` } `json:"result"`
}

func main() {
    body, _ := json.Marshal(map[string]interface{}{
        "account": "elonmusk",
        "text":    "Hello from Xquik!",
    })

    req, err := http.NewRequest("POST", "https://xquik.com/api/v1/x/tweets", bytes.NewReader(body))
    if err != nil {
        panic(err)
    }
    req.Header.Set("x-api-key", "xq_YOUR_KEY_HERE")
    req.Header.Set("Idempotency-Key", "tweet-1895432178065391234")
    req.Header.Set("Content-Type", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    if resp.StatusCode >= 400 {
        body, _ := io.ReadAll(resp.Body)
        panic(string(body))
    }

    var result CreateTweetResponse
    if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
        panic(err)
    }
    var tweetID any
    if result.Result != nil {
        tweetID = result.Result.ID
    } else if result.TweetID != "" {
        tweetID = result.TweetID
    }
    var pollPath any
    if !result.Terminal {
        pollPath = result.StatusURL
    }
    postRecord := map[string]any{
        "status": result.Status,
        "terminal": result.Terminal,
        "safe_to_retry": result.SafeToRetry,
        "write_action_id": result.ID,
        "request_hash": result.Request.Hash,
        "tweet_id": tweetID,
        "account": "elonmusk",
        "charged": result.Billing.Charged,
        "charged_credits": result.Billing.ChargedCredits,
        "poll_path": pollPath,
    }
    encoded, err := json.Marshal(postRecord)
    if err != nil {
        panic(err)
    }
    fmt.Println(string(encoded))
}

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 "Idempotency-Key: image-tweet-1895432178065391234" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "brand_account",
    "text": "Launch notes are live.",
    "media": ["https://cdn.example.com/product-screenshot.png"]
  }' | jq
curl -X POST https://xquik.com/api/v1/x/tweets \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Idempotency-Key: image-reply-1895432178065391234" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "brand_account",
    "text": "Here is the chart.",
    "reply_to_tweet_id": "1893456789012345678",
    "media": ["https://cdn.example.com/reply-chart.png"]
  }' | jq
curl -X POST https://xquik.com/api/v1/x/tweets \
  -H "x-api-key: xq_YOUR_KEY_HERE" \
  -H "Idempotency-Key: video-tweet-1895432178065391234" \
  -H "Content-Type: application/json" \
  -d '{
    "account": "brand_account",
    "text": "Launch walkthrough is live.",
    "media": ["https://cdn.example.com/product-demo.mp4"]
  }' | jq
Store id, request.hash, billing, result, reply_to_tweet_id, and media. Poll Get Write Action Status while terminal is false. Retry only when safeToRetry is true, using a new key.

Headers

string
required
Your API key. Session cookie authentication is also supported.
string
required
Unique key for this intended write. Reuse it only for an exact network replay.
string
required
Must be application/json.

Body

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

Durable lifecycle responses

Send one unique Idempotency-Key per intended write. Reuse it only for the exact same account, target, payload, and media.
Store the X-Request-Id response header with every action record.
  1. Store id, request.hash, account, target, and billing.
  2. Stop only when terminal is true.
  3. Poll statusUrl after Retry-After or pollAfterMs.
  4. Retry only when safeToRetry is true.
  5. Use a new key only for a newly approved write.
  • 200 Terminal
  • 202 Active
  • 400 Invalid Input
  • 401 Unauthenticated
  • 402 Billing Required
  • 403 Account Blocked
  • 409 Idempotency conflict
  • 422 Write Rejected
  • 429 Rate Limited
  • 500 Write Failed
  • 503 Write Unavailable
The action reached success, failed, or expired. Trust terminal, result, billing, and nextAction over the HTTP class.
{
  "object": "x_write_action",
  "id": "xwa_01JY6V7F8M9N0P1Q2R3S4T5U6V",
  "status": "success",
  "terminal": true,
  "safeToRetry": false,
  "billing": { "status": "charged", "chargedCredits": "10" },
  "result": { "confirmed": true },
  "nextAction": null
}
string
Always x_write_action.
string
Durable action ID.
string
Compatibility alias for id.
string
Exact write operation.
string
Current lifecycle status.
boolean
Whether polling can stop.
boolean
Whether a later attempt could succeed.
boolean
Whether a new attempt is safe.
string
Relative polling URL.
number | null
Recommended polling delay.
boolean
Whether billing settled as charged.
string
Settled credits charged.
object
Planned and settled billing state.
object
Stable hash and exact sanitized payload.
object
Exact connected account selected.
object | null
Exact target type and ID.
string | null
Compatibility target ID.
object | null
Confirmed result or desired state.
object | null
Required poll, retry, or verification step.
string
Stable request fingerprint.
string
Correlation ID.
boolean
Whether this response replayed an existing action.
string
Machine-readable error code.
string
Actionable status or error message.
boolean
Whether dispatch occurred.
string
ISO 8601 dispatch time.
string
ISO 8601 creation time.
string
ISO 8601 latest update time.
string
ISO 8601 terminal time.
string
Nonterminal resolution deadline.
string
ISO 8601 confirmation time.
string
ISO 8601 latest confirmation check.
number
Confirmation attempt count.
string
Confirmed tweet ID when available.
string
Confirmed direct message ID when available.
string
Confirmed media ID when available.
string
Public media URL when available.
string
Confirmed community ID when available.
string
Confirmed community name when available.
string
Compatibility result ID.
object
Media details when used.
object
Structured recovery context.
boolean
Whether status is success.
Last modified on July 21, 2026
Morty Proxy This is a proxified and sanitized view of the page, visit original site.