curl. Every endpoint in the API reference also has JavaScript and Python examples, and a playground.
Create a post
You need a channel’sid from List channels, the text and a time.
Many posts at once
Send up to 50 posts in one request, on any mix of channels. To say the same thing on three channels, send three posts. Every post is checked against its platform’s rules before anything is saved. If one post is invalid, none are saved. The400 response’s message names the first problem, and errors lists all of them, each with a path to the post and field, such as ["posts", 2, "mediaIds", 0] for the first file of the third post. Fix them and send the request again.
Publish now
SetpublishNow to true to send every post in the request right away. You can leave out scheduledAt.
Check posts first
Check posts runs the same checks without saving anything. It’s useful while you write. Give it asocialAccountId, or just a platform if you haven’t picked a channel yet.
errors stop a post from being saved. warnings are worth a look but don’t. Each one names its field the way you send it, such as text, mediaIds[1] or platformFields.tiktok.visibility. To see the rules themselves, like text length and video limits, use Get platform rules.
Add images and videos
Posts point to files in your team’s media library. To use a file from the web, import it first, then put itsid in mediaIds.
1
Import the file
https://. The file name’s extension sets the type: jpg, jpeg, png, webp, gif, mp4 or mov. Importing the same URL again returns the file you already have.2
Attach it
X threads
For an X post,text is the first post and carries the media. thread holds the rest of the thread, in order, up to 25 posts. Each post must fit X’s length limit.
thread is [] for an X post that isn’t a thread, and null on other platforms. Other platforms don’t accept thread.
Drafts and approvals
status decides what happens to a post after it’s saved:
If your role can’t publish, every post you create waits for approval, whatever
status you send, and publishNow is refused. Drafts stay drafts.
Approve or send back
People who can approve, meaning owners, admins and editors, can do it through the API too:- Approve posts takes up to 100 ids. Each post is scheduled for its time. Any that can’t be approved come back in
failedwith the reason. - Send a post back turns it into a draft, with an optional
reasonandnotefor the writer. They show on the post assentBack.
Change a post
Update a post changes any post that hasn’t been published. Send only the fields you want to change.mediaIds and thread replace what the post had. Send "thread": [] to turn a thread back into a single post. A post that’s being published right now can’t be changed, so you get 409.
Delete a post
Delete a post works in two ways:- A post that’s still to come is deleted for good.
- A post whose time has passed, like a published or failed one, moves to the trash.
Follow a post
- Get one post. Get a post returns its
status, and once it’s live, itslink. - Find posts. List posts filters by time window, status group, channel or id.
attention=truereturns the posts that need someone: waiting for approval, failed or blocked by a channel that needs reconnecting. A failed post someone dismissed in the Inbox no longer counts. - Count posts. Count posts gives the number in each status group, for a dashboard or badge.
- Get told. Instead of checking again and again, add a webhook and get a request the moment a post goes live or fails.
actions, which says what you can do with it right now: edit, approve, reject, retry and delete. Use it to show or hide buttons in your own app.
Retry a failed post
A failed post has afailureReason in plain words, and a failureKind:
transient: Retry a failed post sends it again now.permanent: the platform rejected it. Change the post, then schedule it again.account: the channel needs reconnecting in Postploy first.
