Tweets
Create a tweet
Post a tweet, or a reply, from a connected account.
POST/v1/tweets600 credits
Send an Idempotency-Key header. Retrying with the same key never repeats the action. How it works
Request body
| Field | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The connected account to act from (from GET /v1/accounts). |
text | string | Required | Tweet text. |
reply_to_tweet_id | string | Optional | Reply to this tweet instead of posting a new one. |
Request
curl -X POST https://api.xautodm.com/v1/tweets \
-H "Authorization: Bearer $XAUTODM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"account_id":"acc_...","text":"Shipping something new today"}'Response
Response
{
"data": { "created": true, "tweet": { "id": "1849...", ... } },
"meta": { "credits_charged": 500, "credits_remaining": 49500, "request_id": "req_..." }
}Errors use one shape for every endpoint. See errors and rate limits.