Posts

Publish to X

Publish an X post or thread, with text, media, or both.

POSThttps://app.tryadeli.com/api/v1/posts
AuthorizationBearer <API key>How keys work

An X post is text, media, or both. Send thread to publish several posts, each a reply to the one before. X publishes synchronously, so the response is the finished post.

Every X post is billed

X charges per API call, and Adeli passes the charge on at X's price: $0.015 a post, or $0.20 for a post containing a link. See X API pricing. Until the workspace has a card on file, this returns 402 x_billing_required.

Body

platform"x"Required
accountIduuidRequired
A connected X account in your organization.
profileIduuid
Optional, because accountId names its profile. If you pass both, they must agree.
textstringRequired
Up to 280 characters, counted as X counts them: every link is 23. Send "" for a media-only post. Adeli cannot tell which accounts have X Premium, so the 280 limit applies to all.
mediaobject[]
Up to 4 images, or 1 GIF, or 1 video. Each is { content_type, base64 } with image/jpeg, image/png, image/webp, image/gif, or video/mp4, or a video as { url }, a public HTTPS MP4 or MOV.
threadobject[]
Up to 24 further posts, each { text, media } with the same rules, published in order as replies.

201 when every post is live.

X cannot publish a thread atomically. When a post after the first fails, the posts before it are already live and stay live: the response is 207 with status: "partial", the failed post's error, and not_attempted for the rest. Publish the remainder yourself as replies to the last providerId that went live. A failure on the first post publishes nothing and is an ordinary error.