Skip to content
Connect an agent

Posts

Schedule a post

Schedules one post to one or more connected accounts.

POST/v1/posts

TL;DR

QuestionAnswer
What does it do?Schedule a post.
What does it need?An API key or an OAuth access token.
What does it take?A JSON body with the fields below, and idempotency-key in a header.
What does it return?Status 201 with a body of type Post.
In the SDK?flung.posts.create()
As an MCP tool?schedule_post
What can go wrong?401 Missing, unknown, revoked or expired API key; 422 The request failed validation; 429 Too many requests for this credential; wait for retry-after seconds. Every failure has the same error shape.

What it does

Schedules one post to one or more connected accounts. Send an Idempotency-Key header so a retry never posts twice.

Example

bash
curl -X POST 'https://api.flung.dev/v1/posts' \  --header "Authorization: Bearer $FLUNG_API_KEY" \  --header 'Content-Type: application/json' \  --header "Idempotency-Key: $(uuidgen)" \  --data '{  "content": "Launching today.",  "accountIds": [    "acct_aaaaaaaaaaaaaaaaaaaaaaaa"  ],  "platformOverrides": {    "x": {      "content": "Launching today. #launch"    }  },  "variables": {    "product": "Flung"  }}'

A successful answer looks like this:

json
{  "id": "post_aaaaaaaaaaaaaaaaaaaaaaaa",  "status": "scheduled",  "content": "string",  "mediaIds": [    "string"  ],  "platformOverrides": {},  "publishAt": "2026-11-01T09:00:00.000Z",  "createdAt": "2026-11-01T09:00:00.000Z",  "updatedAt": "2026-11-01T09:00:00.000Z",  "targets": [    {      "id": "string",      "accountId": "string",      "platform": "x",      "status": "pending",      "platformPostId": "string",      "url": "string",      "error": {},      "publishedAt": "2026-11-01T09:00:00.000Z"    }  ]}

Header parameters

FieldTypeRequiredDescription
idempotency-keystringnoAny unique string, such as a UUID. A retry with the same key and body within 24 hours gets the first answer instead of running again.

Request body

The body has the type an object, with the fields below.

FieldTypeRequiredDescription
contentstringyesat least 1 character; at most 10000 characters.
accountIdsstring[]yesThe connected accounts to publish to.
mediaIdsstring[]nodefault [].
publishAtstringnoWhen to publish. Omit to publish now.
profileIdstringno
platformOverridesobjectnoPer platform: replaces the content, picks a Pinterest board, or sets TikTok's audience and interactions. default {}.
platformOverrides.xobjectno
platformOverrides.x.contentstringnoat least 1 character.
platformOverrides.x.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.x.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.x.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.x.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.x.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.x.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.x.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.instagramobjectno
platformOverrides.instagram.contentstringnoat least 1 character.
platformOverrides.instagram.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.instagram.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.instagram.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.instagram.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.instagram.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.instagram.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.instagram.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.facebookobjectno
platformOverrides.facebook.contentstringnoat least 1 character.
platformOverrides.facebook.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.facebook.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.facebook.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.facebook.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.facebook.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.facebook.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.facebook.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.threadsobjectno
platformOverrides.threads.contentstringnoat least 1 character.
platformOverrides.threads.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.threads.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.threads.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.threads.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.threads.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.threads.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.threads.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.linkedinobjectno
platformOverrides.linkedin.contentstringnoat least 1 character.
platformOverrides.linkedin.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.linkedin.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.linkedin.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.linkedin.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.linkedin.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.linkedin.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.linkedin.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.tiktokobjectno
platformOverrides.tiktok.contentstringnoat least 1 character.
platformOverrides.tiktok.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.tiktok.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.tiktok.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.tiktok.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.tiktok.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.tiktok.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.tiktok.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.youtubeobjectno
platformOverrides.youtube.contentstringnoat least 1 character.
platformOverrides.youtube.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.youtube.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.youtube.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.youtube.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.youtube.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.youtube.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.youtube.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.pinterestobjectno
platformOverrides.pinterest.contentstringnoat least 1 character.
platformOverrides.pinterest.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.pinterest.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.pinterest.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.pinterest.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.pinterest.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.pinterest.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.pinterest.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.blueskyobjectno
platformOverrides.bluesky.contentstringnoat least 1 character.
platformOverrides.bluesky.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.bluesky.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.bluesky.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.bluesky.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.bluesky.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.bluesky.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.bluesky.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.mastodonobjectno
platformOverrides.mastodon.contentstringnoat least 1 character.
platformOverrides.mastodon.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.mastodon.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.mastodon.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.mastodon.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.mastodon.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.mastodon.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.mastodon.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.discordobjectno
platformOverrides.discord.contentstringnoat least 1 character.
platformOverrides.discord.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.discord.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.discord.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.discord.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.discord.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.discord.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.discord.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
platformOverrides.farcasterobjectno
platformOverrides.farcaster.contentstringnoat least 1 character.
platformOverrides.farcaster.boardIdstringnoPinterest only: the board to pin to, instead of the account's default board. at least 1 character; at most 64 characters.
platformOverrides.farcaster.privacyLevel"PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY"noTikTok only: who sees the video, one of the account's privacyLevels (GET /v1/accounts/{id}/posting-options). Defaults to the most public one allowed.
platformOverrides.farcaster.allowCommentsbooleannoTikTok only. Default true, unless the creator turned comments off.
platformOverrides.farcaster.allowDuetbooleannoTikTok only. Default true, unless the creator turned duets off.
platformOverrides.farcaster.allowStitchbooleannoTikTok only. Default true, unless the creator turned stitches off.
platformOverrides.farcaster.promotesOwnBrandbooleannoTikTok only: the video promotes the creator's own business.
platformOverrides.farcaster.brandedContentbooleannoTikTok only: a paid partnership promoting a third party. Not allowed with SELF_ONLY.
variablesobjectnoValues for {{name}} placeholders in the text, over the workspace variables of the same name.

Responses

StatusMeaningBody
201The post was scheduled.Post
401Missing, unknown, revoked or expired API key.Error
422The request failed validation.Error
429Too many requests for this credential; wait for retry-after seconds.Error

Response body

A 201 answer has the type Post.

FieldTypeRequiredDescription
idstringyes
status"scheduled" | "publishing" | "published" | "partially_published" | "failed" | "cancelled"yes
contentstringyes
mediaIdsstring[]yes
platformOverridesobjectyes
platformOverrides.xobjectno
platformOverrides.x.contentstringno
platformOverrides.instagramobjectno
platformOverrides.instagram.contentstringno
platformOverrides.facebookobjectno
platformOverrides.facebook.contentstringno
platformOverrides.threadsobjectno
platformOverrides.threads.contentstringno
platformOverrides.linkedinobjectno
platformOverrides.linkedin.contentstringno
platformOverrides.tiktokobjectno
platformOverrides.tiktok.contentstringno
platformOverrides.youtubeobjectno
platformOverrides.youtube.contentstringno
platformOverrides.pinterestobjectno
platformOverrides.pinterest.contentstringno
platformOverrides.blueskyobjectno
platformOverrides.bluesky.contentstringno
platformOverrides.mastodonobjectno
platformOverrides.mastodon.contentstringno
platformOverrides.discordobjectno
platformOverrides.discord.contentstringno
platformOverrides.farcasterobjectno
platformOverrides.farcaster.contentstringno
publishAtstringyes
createdAtstringyes
updatedAtstringyes
targetsPostTarget[]yes
targets[].idstringyes
targets[].accountIdstringyes
targets[].platformPlatformyes
targets[].status"pending" | "publishing" | "published" | "failed" | "cancelled"yes
targets[].platformPostIdstring | nullyes
targets[].urlstring | nullyes
targets[].errorobject | nullyes
targets[].error.codestringyes
targets[].error.messagestringyes
targets[].publishedAtstring | nullyes

See also

DocWhy
API referenceEvery endpoint
SchemasEvery request and response type
ErrorsEvery error code and what to do about it
schedule_postThe same operation as an MCP tool