curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Behind the scenes",
"media": {
"type": "video",
"url": "https://cdn.example.com/reel.mp4",
"cover_url": "https://cdn.example.com/cover.jpg"
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Quick tip",
"media": {
"type": "video",
"url": "https://cdn.example.com/tip.mp4"
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 looks for the weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/1.jpg",
"https://cdn.example.com/2.jpg"
]
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 outfits for the long weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/look-1.jpg",
"https://cdn.example.com/look-2.jpg",
"https://cdn.example.com/look-3.jpg"
]
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }],
"tiktok": {
"post_mode": "MEDIA_UPLOAD",
"music_usage_confirmation": true,
"privacy_level": "SELF_ONLY"
},
"external_id": "tiktok-draft-001"
}'
{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"status": "draft",
"type": "video",
"caption": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"accounts": [
"<string>"
]
}
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Create Post
Schedule or publish posts to YouTube, TikTok, Instagram, Facebook, LinkedIn, Bluesky, Threads, and Pinterest.
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Behind the scenes",
"media": {
"type": "video",
"url": "https://cdn.example.com/reel.mp4",
"cover_url": "https://cdn.example.com/cover.jpg"
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Quick tip",
"media": {
"type": "video",
"url": "https://cdn.example.com/tip.mp4"
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 looks for the weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/1.jpg",
"https://cdn.example.com/2.jpg"
]
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 outfits for the long weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/look-1.jpg",
"https://cdn.example.com/look-2.jpg",
"https://cdn.example.com/look-3.jpg"
]
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }],
"tiktok": {
"post_mode": "MEDIA_UPLOAD",
"music_usage_confirmation": true,
"privacy_level": "SELF_ONLY"
},
"external_id": "tiktok-draft-001"
}'
{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"status": "draft",
"type": "video",
"caption": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"accounts": [
"<string>"
]
}
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Supported content
media.type | Use for | Response type |
|---|---|---|
video | Instagram Reel, TikTok Reel | video |
slideshow | Instagram carousel, TikTok photo post | slideshow |
Media requirements
Make sure media matches each platform’s rules before creating the post. Media that violates them fails at publish time: the post ends upFAILED
(or PARTIALLY_PUBLISHED) with the platform’s error on the affected
account — fix the media and create a new post, or use
Retry post for accounts that failed for other
reasons.
| Placement | Allowed aspect ratio | Recommended size |
|---|---|---|
| Instagram feed image / carousel item | 4:5 to 1.91:1 | 1080×1350, 1080×1080, 1080×566 |
| Instagram Reel (video) | 9:16 recommended | 1080×1920 |
| TikTok slideshow / video | 9:16 recommended | 1080×1920 |
Before you post
- Active paid plan + API key or Clerk JWT.
- Get accounts → copy each account
id. - Pick
videoorslideshow. For Instagram reels, optionalcover_url.
Request body
mainCaption.[{ "id": "<account-uuid>" }] — up to 10 accounts. Each account object also
accepts optional title (YouTube video title / Pinterest pin title) and
customCaption (overrides caption for that account only).instagram, tiktok, youtube, or pinterest at the top level of the body (same shape as below). Other keys under settings return 400.Show Instagram — settings.instagram
Show Instagram — settings.instagram
media.cover_url.Show TikTok — settings.tiktok
Show TikTok — settings.tiktok
DIRECT_POST (default) or MEDIA_UPLOAD (inbox draft — user finishes in TikTok).PUBLIC_TO_EVERYONE, SELF_ONLY. Must match creator info for the account.Show YouTube — settings.youtube
Show YouTube — settings.youtube
Show Pinterest — settings.pinterest
Show Pinterest — settings.pinterest
Idempotency-Key header.Instagram reel cover
Onlycover_url — a public image URL:
"media": {
"type": "video",
"url": "https://cdn.example.com/reel.mp4",
"cover_url": "https://cdn.example.com/cover.jpg"
}
settings.tiktok.video_cover_timestamp_ms.
Platform settings (optional)
Supported providers: Instagram, TikTok, YouTube, Pinterest — viasettings.<provider> (or the same keys at the top level of the body). Nothing is required; omit settings if you do not need them. YouTube video titles and Pinterest pin titles go on the account object (accounts[].title), not in settings.
tiktok / instagram / youtube / pinterest keys work the same as their settings.* equivalents."settings": {
"instagram": { "cover_url": "https://cdn.example.com/cover.jpg" },
"tiktok": {
"post_mode": "MEDIA_UPLOAD",
"privacy_level": "SELF_ONLY",
"music_usage_confirmation": true
},
"youtube": {
"privacy_status": "unlisted",
"tags": ["ai", "shorts"]
},
"pinterest": { "board_id": "1234567890" }
}
Response
{
"success": true,
"message": "Post saved as draft",
"data": {
"id": "cm123abc",
"status": "draft",
"type": "video",
"caption": "Behind the scenes",
"scheduled_at": null,
"accounts": ["acc_instagram"]
}
}
Examples
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Behind the scenes",
"media": {
"type": "video",
"url": "https://cdn.example.com/reel.mp4",
"cover_url": "https://cdn.example.com/cover.jpg"
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Quick tip",
"media": {
"type": "video",
"url": "https://cdn.example.com/tip.mp4"
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 looks for the weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/1.jpg",
"https://cdn.example.com/2.jpg"
]
},
"accounts": [{ "id": "YOUR_INSTAGRAM_ACCOUNT_ID" }]
}'
curl -X POST "https://mvp2.tryunsora.com/api/v1/posts" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "3 outfits for the long weekend",
"media": {
"type": "slideshow",
"urls": [
"https://cdn.example.com/look-1.jpg",
"https://cdn.example.com/look-2.jpg",
"https://cdn.example.com/look-3.jpg"
]
},
"accounts": [{ "id": "YOUR_TIKTOK_ACCOUNT_ID" }],
"tiktok": {
"post_mode": "MEDIA_UPLOAD",
"music_usage_confirmation": true,
"privacy_level": "SELF_ONLY"
},
"external_id": "tiktok-draft-001"
}'
Post lifecycle
DRAFT → SCHEDULED → PUBLISHING → one of:
| Status | Meaning |
|---|---|
PUBLISHED | Every account published |
PARTIALLY_PUBLISHED | Some accounts published, some failed |
FAILED | No account published |
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
| HTTP | When |
|---|---|
400 | Validation failed |
401 | Invalid auth |
403 | No paid plan or unknown account |
404 | User not found |
409 | Idempotency conflict |
500 | Server error |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key, up to 128 characters. Used only with API keys. Longer keys are ignored.
128The Unsora MCP server sends mcp, which records the post source as MCP. Any other value, or no header, records API.
Body
Post text, used for every account that has no customCaption. Must not be empty. Alias: mainCaption.
Accounts to publish to. Platforms can be mixed. Every account must belong to the caller.
1 - 10 elementsShow child attributes
Show child attributes
Omit or send null for a text post. Send a video object, a slideshow object, or an array of media items.
- Option 1 · object
- Option 2 · object
- Option 3 · object[]
Show child attributes
Show child attributes
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 CAROUSEL when it has more than one item, VIDEO when its single item is a VIDEO, otherwise IMAGE.
VIDEO, IMAGE, CAROUSEL, TEXT 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.
IANA time zone name, e.g. Europe/Berlin. Stored with the schedule for display; it does not change how scheduled_at is read.
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.
Show child attributes
Show child attributes
Same as settings.instagram. Ignored when settings.instagram is present.
Show child attributes
Show child attributes
Same as settings.tiktok. Ignored when settings.tiktok is present.
Show child attributes
Show child attributes
Same as settings.youtube. Ignored when settings.youtube is present.
Show child attributes
Show child attributes
Same as settings.pinterest. Ignored when settings.pinterest is present.
Show child attributes
Show child attributes
Same as settings.google_business. Ignored when settings.google_business is present.
Show child attributes
Show child attributes
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.

