Create a post
const url = 'https://postflow.biz.id/api/v1/posts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"caption":"","mediaIds":[],"targets":[],"tagIds":["example"],"repeatDays":1,"scheduledAt":"2026-04-15T12:00:00Z","action":"draft","useNextSlot":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
object
Responses
Section titled “Responses”The created post.
object
Derived from the targets.
pending = waiting for the owner’s approval.
Send as expectedVersion when updating to avoid overwriting someone else’s change.
object
Use in mediaIds.
App path of the file. With the API, download it from /media/{id}/file.
One account a post goes to.
object
Target id, for retrying one account.
As sent in the request.
object
object
Hex color
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.
object
object
A sentence you can show to a person.
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.
object
object
A sentence you can show to a person.
Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.
Example
{ "error": { "code": "UNAUTHENTICATED" }}Subscription inactive or plan limit reached.
object
object
A sentence you can show to a person.
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.
object
object
A sentence you can show to a person.
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.
object
object
A sentence you can show to a person.
Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.
Example
{ "error": { "code": "UNAUTHENTICATED" }}