Skip to content

Create a post

POST
/posts
curl --request POST \
--url https://postflow.biz.id/api/v1/posts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "caption": "", "mediaIds": [], "targets": [], "tagIds": [ "example" ], "repeatDays": 1, "scheduledAt": "2026-04-15T12:00:00Z", "action": "draft", "useNextSlot": true }'

action: draft saves it, schedule queues it for scheduledAt (or the next queue slot with useNextSlot), now publishes right away, submit sends it for the owner’s approval. Pre-flight checks each target against its platform’s rules first.

MCP tool: create_post.

Media typeapplication/json
object
caption
string
"" <= 70000 characters
mediaIds
Array<string>
default: <= 35 items
targets
Array<object>
default: <= 20 items
object
socialAccountId
required
string
>= 1 characters
contentType
required
string
Allowed values: fb_post fb_photo fb_video fb_reel ig_image ig_carousel ig_reel ig_story tt_video tt_photo th_text th_image th_video th_carousel tg_message tg_media bs_post bs_video yt_short yt_video
captionOverride
Any of:
string
<= 70000 characters
mediaIds
Any of:
Array<string>
<= 35 items
options
object
firstComment
string
<= 2200 characters
followUps
Array<object>
<= 5 items
object
text
required
string
>= 1 characters <= 2200 characters
delayMinutes
required
integer
>= 1 <= 1440
link
string format: uri
<= 2000 characters
shareToFeed
boolean
instagram
object
collaborators
Array<string>
<= 3 items
aiGenerated
boolean
tiktok
object
privacyLevel
string
<= 40 characters
disableComment
boolean
disableDuet
boolean
disableStitch
boolean
brandOrganic
boolean
brandContent
boolean
autoAddMusic
boolean
music
object
id
required
string
>= 1 characters <= 64 characters
title
required
string
<= 200 characters
artist
string
<= 200 characters
coverUrl
Any of:
string format: uri
<= 2000 characters
volume
integer
<= 100
originalVolume
integer
<= 100
cover
object
mediaId
string
>= 1 characters
offsetMs
integer
<= 14400000
youtube
object
title
string
<= 100 characters
privacy
string
Allowed values: public unlisted private
madeForKids
boolean
tags
Array<string>
<= 50 items
categoryId
string
/^\d{1,3}$/
thumbnailMediaId
string
>= 1 characters
tagIds
Array<string>
<= 10 items
repeatDays
Any of:
integer
>= -9007199254740991 <= 9007199254740991
scheduledAt
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
action
required
string
Allowed values: draft schedule now submit
useNextSlot
boolean

The created post.

Media typeapplication/json
object
id
required
string
caption
required
string
scheduledAt
required
Any of:
string format: date-time
status
required

Derived from the targets.

string
Allowed values: draft scheduled paused publishing published partial failed needs_reschedule action_required
review
required

pending = waiting for the owner’s approval.

string
Allowed values: none pending
version
required

Send as expectedVersion when updating to avoid overwriting someone else’s change.

integer
media
required
Array<object>
object
id
required

Use in mediaIds.

string
kind
required
string
Allowed values: image video
mime
required
string
Allowed values: image/jpeg image/png image/webp image/gif video/mp4 video/quicktime video/webm
sizeBytes
required
integer
width
required
Any of:
integer
height
required
Any of:
integer
durationMs
required
Any of:
integer
originalName
required
string
parentId
required
Any of:

Set on edited copies (e.g. a crop) of another file.

string
url
required

App path of the file. With the API, download it from /media/{id}/file.

string
thumbUrl
required
Any of:
string
createdAt
required
string format: date-time
targets
required
Array<object>

One account a post goes to.

object
id
required

Target id, for retrying one account.

string
socialAccountId
required
string
platform
required
string
Allowed values: facebook instagram tiktok threads bluesky youtube telegram
accountName
required
string
accountAvatarUrl
required
Any of:
string
contentType
required
string
Allowed values: fb_post fb_photo fb_video fb_reel ig_image ig_carousel ig_reel ig_story tt_video tt_photo th_text th_image th_video th_carousel tg_message tg_media bs_post bs_video yt_short yt_video
captionOverride
required
Any of:
string
mediaIds
required
Any of:
Array<string>
options
required

As sent in the request.

object
status
required
string
Allowed values: draft scheduled queued publishing published handed_off failed paused needs_reschedule
errorCode
required
Any of:
string
errorMessage
required
Any of:

Why publishing failed, in plain words.

string
permalink
required
Any of:

Link to the live post.

string
publishedAt
required
Any of:
string format: date-time
firstCommentStatus
required
Any of:
string
Allowed values: pending done failed
tags
required
Array<object>
object
id
required
string
name
required
string
color
required

Hex color

string
repeatDays
required
Any of:
integer
shareToken
required
Any of:

Set while a public preview link exists.

string
clientApprovedAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time

Example

{
"status": "draft",
"review": "none",
"media": [
{
"kind": "image",
"mime": "image/jpeg"
}
],
"targets": [
{
"platform": "facebook",
"contentType": "fb_post",
"status": "draft",
"firstCommentStatus": "pending"
}
]
}

Validation failed. details lists what to fix.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Missing, invalid, expired or deleted key or token.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Subscription inactive or plan limit reached.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Not allowed: a read-only key, the owner’s approval, or an owner-only action.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

More than 120 requests in a minute with this key.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}