🎉 Cyber Week: 30% off your first payment — ends Sunday, Dec 7Claim 30% off
Docs
/v1/posts · Posts

Posts API

Create, list, update, and cancel posts you send through the API. This is the endpoint for bring-your-own tweet text and media, with optional auto-reply and auto-retweet — the same engines used in the XBeast app.

Post object

{
  "id": "10932",
  "account_id": "123456789",
  "status": "scheduled",
  "scheduled_at": "2026-08-25T16:00:00.000Z",
  "tweets": [
    { "text": "Hello from my CMS.", "media_url": "https://example.com/image.jpg" }
  ],
  "auto_reply": {
    "enabled": true,
    "max": 10,
    "like": false,
    "verified_only": false
  },
  "auto_retweet": { "enabled": true, "after_hours": 8 },
  "tweet_id": null,
  "url": null,
  "source": "api",
  "created_at": "2026-08-24T18:01:00.000Z"
}
FieldTypeRequiredDescription
idstring—XBeast post id.
account_idstring—Connected account id.
statusstring—scheduled, posted, cancelled, error, or draft.
scheduled_atstring (ISO 8601)—When the tweet should go live (UTC).
tweetsarray—Thread items. One item is a single tweet.
tweets[].textstringsee noteTweet body. Required if media_url is omitted.
tweets[].media_urlstringsee noteHTTPS image or video URL. Required if text is empty.
auto_replyobject—Auto-reply settings applied after publish.
auto_retweetobject—enabled and after_hours (1–24).
tweet_idstring | null—Network post id after publish.
urlstring | null—Public post URL after publish.
sourcestring—Always api for posts created here.

Create a post

POST/api/v1/posts
Omit scheduled_at (or send null) to publish immediately. A future ISO 8601 datetime schedules the post. Past times are rejected. Set mode: "draft" to save a draft instead. Send an Idempotency-Key header (or the idempotency_key body field) so a retry returns the existing post instead of creating a second one.

Body

FieldTypeRequiredDescription
account_idstringYesFrom GET /api/v1/accounts.
modestringNodraft, schedule or now. Legacy behavior: omitting scheduled_at publishes now.
tweetsarraysee noteAt least one { text, media_url? }. Required unless article is sent.
articleobjectsee note{ title, body_markdown, cover_image_url? }. Requires X Premium.
scheduled_atstring | nullNoFuture ISO 8601. Required when mode is schedule. Omit or null to post now.
idempotency_keystringNoAgent retry key. Max 200 characters. Same key returns the same post.
auto_reply.enabledbooleanNoReply to early comments (within 3 hours). Paid plans.
auto_reply.maxnumberNo5–50 in steps of 5. Default 5.
auto_reply.likebooleanNoLike the comment when replying.
auto_reply.verified_onlybooleanNoOnly reply to verified accounts.
auto_retweet.enabledbooleanNoRepost after after_hours. Undo happens automatically ~12 hours later.
auto_retweet.after_hoursintegerNo1–24. Default 8.
auto_plugobjectNo{ id, min_likes } — append an auto plug after the like threshold. Paid plans.
community_idstringNoPost into an X community (see GET /api/v1/communities).
Schedule
curl -X POST "https://xbeast.io/api/v1/posts" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "YOUR_ACCOUNT_ID",
    "tweets": [{ "text": "Shipping at noon.", "media_url": "https://example.com/img.jpg" }],
    "scheduled_at": "2026-08-25T16:00:00.000Z",
    "auto_reply": { "enabled": true, "max": 10, "like": false, "verified_only": false },
    "auto_retweet": { "enabled": true, "after_hours": 8 }
  }'
Post now
curl -X POST "https://xbeast.io/api/v1/posts" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "YOUR_ACCOUNT_ID",
    "tweets": [{ "text": "Going out now." }]
  }'
Immediate posts return status: posted, tweet_id, and url when the network accepts them. The account must belong to you and have posting enabled. Publishing to X costs 1 credit per post (a thread counts as one). Posts with a URL cost 10 extra credits. Daily cap: 7 scheduled + posted tweets per account per day.

List posts

GET/api/v1/posts
Lists posts for the key owner. source defaults to api for compatibility; pass source=all to include drafts created in the app and by agents.

Query

FieldTypeRequiredDescription
statusstringNodraft, scheduled, queue, posted, cancelled, error or history.
account_idstringNoFilter by connected account.
preset_idstringNoFilter preset-generated posts.
sourcestringNoapi, ui, mcp, preset, instant, beast-mode or all.
platformstringNox, linkedin, bluesky or threads.
fromstringNoStart date (ISO 8601).
tostringNoEnd date (ISO 8601).
searchstringNoSearch tweet text.
include_metricsbooleanNoInclude views, likes, replies, retweets and bookmarks.
limitnumberNoDefault 20, max 100.
offsetnumberNoPagination offset.
curl "https://xbeast.io/api/v1/posts?status=scheduled&limit=20" \
  -H "Authorization: Bearer xb_live_YOUR_KEY"
Response: { "posts": [ ...Post ] }

Get a post

GET/api/v1/posts/:id
curl "https://xbeast.io/api/v1/posts/10932" \
  -H "Authorization: Bearer xb_live_YOUR_KEY"

Update a post

PATCH/api/v1/posts/:id
Only unsent posts. You cannot update a posted or cancelled post. Changing scheduled_at or account_id re-checks the daily cap.

Body (all optional)

FieldTypeRequiredDescription
account_idstringNoMove to another connected account.
tweetsarrayNoReplace thread content.
scheduled_atstringNoMust be a future datetime (cannot clear to post-now via PATCH).
auto_replyobjectNoSame shape as create.
auto_retweetobjectNoSame shape as create.
curl -X PATCH "https://xbeast.io/api/v1/posts/10932" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "scheduled_at": "2026-08-25T18:00:00.000Z" }'

Cancel or delete

DELETE/api/v1/posts/:id
Scheduled posts are cancelled (they stay in history as cancelled). Drafts are deleted. Posted posts cannot be deleted via the API.
curl -X DELETE "https://xbeast.io/api/v1/posts/10932" \
  -H "Authorization: Bearer xb_live_YOUR_KEY"
{ "message": "Post cancelled" }

Actions

Publish now

POST/api/v1/posts/:id/publish
Publishes an unsent post immediately. Safe to retry: if the post is already sent, the existing result is returned instead of posting twice. Optional body can override auto_reply, auto_retweet, auto_plug and community_id.
curl -X POST "https://xbeast.io/api/v1/posts/10932/publish" \
  -H "Authorization: Bearer xb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Queue into the next free slot

POST/api/v1/posts/:id/queue
Moves the post into the account's next available queue slot. Optional body: account_id.

Cancel a scheduled post

POST/api/v1/posts/:id/cancel

Uncancel a post

POST/api/v1/posts/:id/uncancel

Mark as already posted

POST/api/v1/posts/:id/mark-posted
Use after an uncertain publish failure (error.may_have_posted: true) once you have verified the post is live. Clears the error state without posting again.

Regenerate a preset post

POST/api/v1/posts/:id/regenerate
Only for upcoming preset or queue-preset posts. Consumes the preset's credit cost and replaces the tweets.

Related