Create / Reply / Quote
Create / Reply / Quote
Post tweets, reply to conversations, and quote-tweet, all via API. Requires a connected X account (see Account Connect). Each write operation consumes 100 flat credits.
POST
/v2/tweets/createCreate a new tweet from your connected X account.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | required | — | Tweet text (max 25,000 characters) |
| media_ids | string[] | optional | [] | Optional array of X media IDs, passed to X as-is. XCROP has no media upload endpoint, so use IDs of media already uploaded to X on the connected account |
Example Request
BASH
curl -X POST https://xcrop.io/api/v2/tweets/create \ -H "Authorization: Bearer $XCROP_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Hello from XCROP API! 🚀"}'
Response
200 OKJSON
{ "data": { "id": "1893045621038174208", "text": "Hello from XCROP API! 🚀", "url": "https://x.com/i/status/1893045621038174208" }, "meta": { "latency_ms": 1240 } }
POST
/v2/tweets/replyReply to an existing tweet.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| tweet_id | string | required | — | The ID of the tweet to reply to |
| text | string | required | — | Reply text (max 25,000 chars) |
BASH
curl -X POST https://xcrop.io/api/v2/tweets/reply \ -H "Authorization: Bearer $XCROP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "tweet_id": "1893045621038174208", "text": "Great analysis! I agree with your thesis." }'
ResponseJSON
{ "data": { "id": "1893045621038174299", "text": "Great analysis! I agree with your thesis.", "in_reply_to": "1893045621038174208", "url": "https://x.com/i/status/1893045621038174299" }, "meta": { "latency_ms": 980 } }
POST
/v2/tweets/quoteQuote-tweet an existing tweet with your commentary.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | required | — | Your commentary text (max 25,000 chars) |
| quoted_tweet_id | string | required | — | The ID of the tweet to quote |
BASH
curl -X POST https://xcrop.io/api/v2/tweets/quote \ -H "Authorization: Bearer $XCROP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "This is the alpha signal we have been looking for 👀", "quoted_tweet_id": "1893045621038174208" }'
ResponseJSON
{ "data": { "id": "1893045621038174350", "text": "This is the alpha signal we have been looking for 👀", "quoted_tweet_id": "1893045621038174208", "url": "https://x.com/i/status/1893045621038174350" }, "meta": { "latency_ms": 1100 } }
DELETE
/v2/tweets/:tweetIdDelete a tweet by ID. You can only delete your own tweets.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| tweetId | string | required | — | The numeric tweet ID to delete (path parameter) |
BASH
curl -X DELETE https://xcrop.io/api/v2/tweets/1893045621038174208 \ -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{ "success": true, "data": { "tweet_id": "1893045621038174208", "deleted": true }, "meta": { "latency_ms": 420 } }
⚠
Write operations require an active X session. If your session expires (you'll get a
401 error), XCROP will automatically attempt to re-login. If re-login fails, you'll need to reconnect via POST /v2/account/connect.ℹ
Each write operation (create, reply, quote, delete) consumes 100 flat credits regardless of content length. Long tweets (280+ chars) use X's Note Tweet feature automatically.