Skip to main content
POST
Schedule a post for later or save it as a draft. A scheduled post is published at its time by the Unsora scheduler; a draft is published with Publish post. Posts can target any connected account on YouTube, TikTok, Instagram, Facebook, LinkedIn, X, Bluesky, Threads, Pinterest and Google Business Profile: up to 10 accounts per post, mixed platforms allowed, each account once.

Supported content

Which post types each platform takes: Connect accounts in the Unsora app, then list them with Get accounts.

Media requirements

A scheduled post is checked when you create it. If the media doesn’t fit a platform, the request fails with 400 and code PLATFORM_RULES, with one entry per problem in issues. Drafts are checked when you publish them. Image format, size and aspect ratio don’t block a post. Unsora fixes them for each platform at publish time:
  • Format: images a platform doesn’t take are converted to JPEG (Instagram takes JPEG only).
  • Aspect ratio: images outside the allowed range (Instagram: 4:5 to 1.91:1) are padded over a blurred copy of themselves, nothing is cropped.
  • Carousels: Instagram carousel images are padded to the first image’s ratio, and Pinterest images are made the same pixel size.
  • Size: oversized images are scaled and re-compressed under the platform’s cap.
Videos should be MP4 or MOV (H.264 + AAC) at a publicly reachable URL.

Before you post

  1. Active paid plan + API key.
  2. Get accounts → copy each account id.
  3. Pick your media. For Pinterest, get a board id with Pinterest boards; for TikTok, check the allowed privacy options with TikTok creator info.

Request body

string
required
Post caption. Legacy alias: mainCaption.
array
required
[{ "id": "<account-id>" }]: 1 to 10 accounts, each once (alias accountId). Each account object also accepts:
  • customCaption: replaces caption for that account only.
  • title: the YouTube video title. Defaults to the first 100 characters of the caption. Pinterest ignores it; use settings.pinterest.title.
object | array | null
Omit, or send null, for a text post. Media URLs are stored as uploads and appear in List uploads.
string
Overrides the inferred post type: VIDEO, IMAGE, CAROUSEL or TEXT.
object
Optional per-platform options. You can also send instagram, tiktok, youtube, pinterest or google_business at the top level of the body (same shape). Each account gets only its own platform’s options. Other keys under settings return 400.
string
ISO 8601 with a time zone offset (or Unix time in milliseconds), at least 2 minutes ahead. Omit for a draft. Alias: scheduledFor.
string
IANA time zone, e.g. Europe/Berlin. Stored with the schedule for display; it doesn’t change how scheduled_at is read.
string
Your own id for the request. Without an Idempotency-Key header, its first 128 characters are used as the idempotency key.

Instagram reel cover

Only cover_url, a public image URL:
TikTok reel cover frame: optional settings.tiktok.video_cover_timestamp_ms.

Platform settings (optional)

Nothing in settings is required; leave it out if you don’t need it. The YouTube video title goes on the account object (accounts[].title); the Pinterest pin title goes in settings.pinterest.title.
Top-level tiktok / instagram / youtube / pinterest / google_business keys work the same as their settings.* equivalents.

Response

Examples

Post lifecycle

DRAFT → SCHEDULED → PUBLISHING → one of: For FAILED or PARTIALLY_PUBLISHED posts, call Retry post: it re-attempts only the failed accounts and never double-posts. Per-account results (including publishedUrl and error) are on each post’s postAccounts.

Errors

Authorizations

Authorization
string
header
required

An Unsora API key (uns_…). A Clerk session token also works.

Headers

Idempotency-Key
string

Idempotency key, up to 128 characters. Used only with API keys. Longer keys are ignored.

Maximum string length: 128
X-Unsora-Client
string

The Unsora MCP server sends mcp, which records the post source as MCP. Any other value, or no header, records API.

Body

application/json
caption
string
required

Post text, used for every account that has no customCaption. Must not be empty. Alias: mainCaption.

accounts
object[]
required

Accounts to publish to. Platforms can be mixed. Every account must belong to the caller.

Required array length: 1 - 10 elements
media
object

Omit or send null for a text post. Send a video object, a slideshow object, or an array of media items.

type
enum<string>

Overrides the post type inferred from media. Inferred type: no media is TEXT; a video object is VIDEO; a slideshow object is CAROUSEL; an array is VIDEO when any item is a VIDEO, otherwise CAROUSEL when it has more than one IMAGE and IMAGE when it has one. THUMBNAIL items are covers and don't count.

Available options:
VIDEO,
IMAGE,
CAROUSEL,
TEXT
scheduled_at

When to publish, as an ISO 8601 date-time with a UTC offset (Unix time in milliseconds is also accepted). Must be at least 2 minutes in the future. Omit, or send null or an empty string, to save a draft. Alias: scheduledFor.

timezone
string

IANA time zone name, e.g. Europe/Berlin. Stored with the schedule for display; it does not change how scheduled_at is read.

settings
object

Per-platform options. Each account receives only the options for its own platform; accounts on other platforms ignore them. Any other key is rejected with 400.

instagram
object

Same as settings.instagram. Ignored when settings.instagram is present.

tiktok
object

Same as settings.tiktok. Ignored when settings.tiktok is present.

youtube
object

Same as settings.youtube. Ignored when settings.youtube is present.

pinterest
object

Same as settings.pinterest. Ignored when settings.pinterest is present.

google_business
object

Same as settings.google_business. Ignored when settings.google_business is present.

external_id
string

Your own identifier for this request. With an API key and no Idempotency-Key header, its first 128 characters are used as the idempotency key. Not stored on the post.

Response

Post created

success
boolean
required
message
string
required

"Post scheduled" or "Post saved as draft".

data
object
required

Short form of a post returned by POST /posts. Uses lowercase values; GET /posts/{id} returns the full record.