Posts
Publish a post
Live apps publish at once, schedule with a date or save a draft; test apps only simulate. With ?dry_run=true it checks everything and writes nothing.
Authorizations
AuthorizationstringrequiredYour personal key or OAuth access token, sent as
Bearer <token>.
Query parameters
dry_runstringtrue: runs every check the send would run (network rules, accounts, media, creation, live subscription) and writes nothing. Returns 200readyor 422post_refused.Allowed values:
truefalse
Headers
Idempotency-KeystringReplayed with the same body, the request returns the same response without creating a second post. A dry run does not consume the key.
Body
application/json
establishmentIdstringrequiredEstablishment, in the Workspace of the token grant (
GET /v1/establishments)targetsobject[]requiredOne network per target
Show child attributes
platformstringrequiredTargeted network
Allowed values:
instagramfacebookxlinkedintiktoktextstringrequiredCaption published on this network
mediaobject[]Attached media
Show child attributes
idstringIdentifier of a media of the establishment library (otherwise
urlandtype)urlstringPublic address of the media (https in live); without an identifier
typestringKind of the media given by address
Allowed values:
imagevideo
formatstringFormat (
post,reel,story,carousel...); by default, the one the network would serveaccountIdstringLive: the connected account that publishes, when the establishment has several on this network (
GET /v1/establishments/:id/accounts)
scheduledAtstring<date-time>Scheduling date (ISO 8601), in the future; absent: publish immediately. Not allowed with
statusdraftstatusstringdraft: a draft (live only), created without a date, nothing is sent;PATCH /v1/posts/:idschedules itAllowed values:
draft
Response
200application/json
Dry run: every check passed.
statusstringrequiredAlways
readyAllowed values:
readydryRunbooleanrequiredAlways
trueAllowed values:
truetargetsobject[]requiredThe checked targets
Show child attributes
platformstringrequiredNetwork of the target
statestringrequiredAlways
readyAllowed values:
readyaccountIdstringLive: the account that would publish
handlestringLive: its displayed handle
201application/json
Live: publishing or scheduled. Test: simulated.
idstringrequiredIdentifier of the post, to read back with
GET /v1/posts/:idstatusstringrequiredState of the post at creation
Allowed values:
draftpublishingscheduledestablishmentIdstringrequiredEstablishment of the post
targetsobject[]requiredThe targets of the post
Show child attributes
platformstringrequiredNetwork of the target
accountIdstringrequiredThe account that publishes
statestringrequiredState of the target at creation
Allowed values:
draftpublishingscheduledfailed
scheduledAtstring<date-time>When the post is scheduled to be published
400
Malformed body.
401
The token is missing, unknown, expired or revoked.
402
subscription_required (live, dry run included).
403
The token does not have the posts:write scope.
404
establishment_not_found: outside the Workspace of the token.
422application/json
post_refused: a network, the establishment or the creation would refuse; media_import_refused (live) with its reason; idempotency_key_reused.
4XXapplication/json
Any other error, in the error envelope.