Docs
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"
}Create a post
POST
/api/v1/postsOmit
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
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/postsLists 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
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/:idcurl "https://xbeast.io/api/v1/posts/10932" \ -H "Authorization: Bearer xb_live_YOUR_KEY"
Update a post
PATCH
/api/v1/posts/:idOnly unsent posts. You cannot update a posted or cancelled post. Changing
scheduled_at or account_id re-checks the daily cap.Body (all optional)
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/:idScheduled 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/publishPublishes 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/queueMoves the post into the account's next available queue slot. Optional body:
account_id.Cancel a scheduled post
POST
/api/v1/posts/:id/cancelUncancel a post
POST
/api/v1/posts/:id/uncancelMark as already posted
POST
/api/v1/posts/:id/mark-postedUse 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/regenerateOnly for upcoming preset or queue-preset posts. Consumes the preset's credit cost and replaces the tweets.