Publish Post
Creates and queues a post for delivery to a social platform. Returns immediately with status "pending" — delivery is asynchronous. Use get_post_status to poll f
publish_post
Creates and queues a post for delivery to a social platform. Returns immediately with status "pending" — delivery is asynchronous. Use get_post_status to poll for the final delivery outcome. One post = one platform. For multiple platforms, call publish_post multiple times. Supply Idempotency-Key via the idempotencyKey parameter to safely retry.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | instagram | twitter | x | linkedin | tiktok | youtube | yes | Target social platform. |
accountId | string | yes | Connected social account ID for this platform. |
status | publish | scheduled | draft | yes | publish = immediate, scheduled = requires scheduledAt, draft = save without publishing. |
postType | string | yes | Type of post. Instagram: feed, reel, story, carousel. Twitter: tweet, thread. LinkedIn: post, document. TikTok: video, photo. YouTube: video, short. Pinterest: pin. |
content | string | array<object> | yes | Post content. String for simple posts, array for threads. String is normalized to [{text, media}] internally. |
media | array<object> | no | Top-level media items. Only valid when content is a string. For threads (content is array), put media inside each content item. |
options | object | no | Platform-specific options. Instagram: collaborators, coverUrl, shareToFeed, thumbOffset. YouTube: title, privacy, categoryId, madeForKids, tags. Pinterest: boardId, destinationLink, title. TikTok: disableComments, disableDuet, disableStitch. |
scheduledAt | string | no | ISO-8601 future timestamp. Required when status is "scheduled". |
idempotencyKey | string | no | Unique key to deduplicate retries. Same key always returns the same post. |
workspaceId | string | no | Workspace ID. Required if your API key accesses multiple workspaces. |
When to use
Call publish_post whenever you want to create and deliver a post to a single social network. One tool invocation = one platform. For cross-posting, issue multiple calls in parallel — each gets its own postId and retries independently.
Typical flow
- Resolve the
accountIdvialist_accounts(or from the user's last-known selection). - Build the
content— string for simple posts, array for threads. - Attach any media by
id(fromupload_mediaorcreate_upload_url) orurl(public URL, fetched async). - Generate an
idempotencyKey(UUID per logical post). - Call
publish_postand record the returnedpostId. - Optionally poll
get_post_statusor wait for thepost.publishedwebhook.
Example
{
"workspaceId": "wks_01H...",
"platform": "twitter",
"accountId": "acc_01H...",
"status": "publish",
"postType": "tweet",
"content": "Shipping our new API-first publishing platform today.",
"idempotencyKey": "8f2a4b1c-7d9e-4c3b-9a1f-5e6d8c7b4a3f"
}Thread example:
{
"workspaceId": "wks_01H...",
"platform": "twitter",
"accountId": "acc_01H...",
"status": "publish",
"postType": "thread",
"content": [
{ "text": "Part 1 of the thread." },
{ "text": "Part 2, continuing the idea." },
{ "text": "Part 3, wrap-up." }
],
"idempotencyKey": "c4e1d2b3-a4f5-6b78-9c0d-1e2f3a4b5c6d"
}Gotchas
status: "scheduled"requires ascheduledAtISO 8601 timestamp in the future.status: "draft"requires theposts.create_draftpermission;publishandscheduledrequireposts.publish.- Mixing array
contentwith a top-levelmediafield is a validation error. Attach media to individual content items instead. - On Instagram, a single content item with 2+ media is auto-promoted to
postType: "carousel". You don't need to pre-classify. - The response returns in milliseconds with
status: "queued". Actual delivery to the network happens asynchronously — do not assume the post is live without polling or webhooks.