Posts API
Draft posts for TikTok, Instagram, X, LinkedIn, Facebook and YouTube, then publish them now or schedule them.
A post goes out to every connected account on the platforms you pick: TikTok, Instagram, X, LinkedIn, Facebook and YouTube. Connect accounts once in Publish on mostly.so.
Posting is two steps on purpose:
- Draft the post (caption, media, platforms, time). Nothing goes out.
- Publish the draft, now or at its scheduled time. This is the step that posts for real, so it's the one place to ask your user for a final yes.
Only X costs credits: 2 credits per X post, 15 when it contains a link. Every other platform is free.
1. Draft a post
Drafts are made with the create_post_draft tool, called over HTTP (how) or with mostly posts create in the CLI.
| Field | Type | Description |
|---|---|---|
content | string | The caption. (Required) |
platforms | string[] | Any of TIKTOK, INSTAGRAM, TWITTER (X), LINKEDIN, FACEBOOK, YOUTUBE. (Required) |
slideDeckId | string | null | Post a slide deck as a photo carousel, in slide order. |
storyboardExportId | string | null | Post a finished storyboard export as the video. |
mediaUrls | string[] | null | Media in post order, when not posting a deck or export. Use uploads for local files. |
title | string | null | Short title. TikTok photo posts show up to 90 characters. |
scheduledFor | string | null | ISO 8601 with offset, e.g. 2026-12-05T09:00:00+08:00. null posts as soon as it's published. |
tiktokPrivacyLevel | string | null | PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY. |
TikTok, Instagram and YouTube need media. YouTube needs exactly one video.
curl https://mostly.so/api/mcp \
-H "Authorization: Bearer mst_live_..." \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "create_post_draft",
"arguments": {
"content": "5 mistakes with your morning serum (save this)",
"platforms": ["TIKTOK", "INSTAGRAM"],
"slideDeckId": "d41f…",
"scheduledFor": "2026-12-05T09:00:00+08:00"
}
}
}'The result has the draft's id.
2. Publish or schedule
POST /api/v1/posts/:id/publish| Field | Type | Description |
|---|---|---|
scheduledFor | string | null | Omit to use the draft's saved time. A future ISO 8601 time schedules it. null publishes now. |
curl -X POST https://mostly.so/api/v1/posts/7a90…/publish \
-H "Authorization: Bearer mst_live_..." \
-H "content-type: application/json" \
-d '{"scheduledFor": null}'{
"success": true,
"post": {
"id": "7a90…",
"status": "PUBLISHING",
"title": null,
"caption": "5 mistakes with your morning serum (save this)",
"mediaType": "CAROUSEL",
"mediaCount": 6,
"channels": [
{ "platform": "TIKTOK", "accountName": "glowlabs", "tiktokPrivacyLevel": "PUBLIC_TO_EVERYONE" },
{ "platform": "INSTAGRAM", "accountName": "glowlabs" }
],
"scheduledFor": null,
"results": [],
"publishError": null,
"manageUrl": "/publish"
}
}Before anything is queued, the accounts are checked again, the media is checked against each platform's rules, and your balance is checked for X posts.
Post status
status | Meaning |
|---|---|
DRAFT | Not published yet. |
SCHEDULED | Waiting for scheduledFor. |
PUBLISHING | Going out now. |
COMPLETED | Live everywhere. results[].url links each post. |
PARTIALLY_FAILED | Live on some platforms. results[].error says why the others failed. |
FAILED, CANCELLED | Not posted. |
Follow a post with the get_post tool. Use retry_post for failures and cancel_post to stop a scheduled one.
Errors
| Status | error | When |
|---|---|---|
400 | BAD_REQUEST | Time in the past, no accounts chosen, or the media doesn't fit a platform. |
402 | INSUFFICIENT_CREDITS | Not enough credits for the X posts. |
404 | NOT_FOUND | No such post in this workspace. |
409 | CONFLICT | Only DRAFT and CANCELLED posts can be published. |