跳转到内容

Posts

此内容尚不支持你的语言。

GET /v1/posts (scope posts:read) lists one product’s (workspace’s) posts. The semantics below are a contract.

Parameter Meaning
product_id required; an unknown product is 404 product_not_found
status optional post status filter, one snake_case name (draft, scheduled, publishing, partially_published, published, failed, cancelled), matched case-insensitively (published and Published both work); blank = no filter; a multi-word PascalCase name such as PartiallyPublished, a number or a typo is 400 post_status_invalid (target status)
target_status optional, repeatable and/or comma-separated (?target_status=failed,needs_review&target_status=unknown): keeps the posts with at least one target in any of the given statuses (pending, scheduled, publishing, processing, published, failed, unknown, needs_review, cancelled); names are snake_case, matched case-insensitively; empty segments are ignored, duplicates collapse, and a multi-word PascalCase name such as NeedsReview, a number or a typo is 400 post_target_status_invalid (target target_status). It combines with status and the window (AND)
from, to optional ISO-8601 instants with an offset; the window is half-open [from, to) on scheduled_at ?? created_at (a draft has no scheduled_at, so it falls back to its creation instant; a post exactly on to is excluded)
updated_since optional ISO-8601 instant with an offset; keeps the posts whose updated_at is at or after it (inclusive). updated_at moves at least on every edit and every change of the publishing status of the post or of any of its targets (it can also move without a visible change), so it marks the last moment the post’s state changed, and such a change, including one on a sibling target, re-enters the post into the window. It combines with every other filter (AND). With target_status=failed,needs_review,unknown and a recent instant it finds the posts that recently came to need attention (a needs_review/unknown target has no failure timestamp of its own). An unparsable value is 400 (standard error envelope), like a malformed from/to/product_id: an invalid parameter is refused, never silently ignored
page ≥ 1 (lower values become 1)
page_size 1..100, default 20 (clamped)

The response is { items: Post[], page, page_size, total }, ordered by updated_at descending, then id (a stable tie-breaker, so posts with the same updated_at are never skipped or repeated across pages); total counts the whole window, so a client pages until it has total items. With target_status, each matching post comes back once with all its targets, and total counts posts, not targets. Every non-draft post has a scheduled_at (publish-now schedules it at the current instant).

POST /v1/posts/{id}/schedule and POST /v1/posts/{id}/publish (scope posts:publish) move a draft to scheduled; publish-now schedules it at the current instant. The answer is 202 with the publication’s status_url, or, for an API key whose post needs a person’s consent or a team review, the requires_user_action block with the review link.

{ "post_version": 3, "scheduled_at": "2026-11-20T09:00:00-03:00", "timezone": "America/Sao_Paulo",
"authorization_reference": null, "consent_confirmed": false }

Publish-now takes post_version, authorization_reference and consent_confirmed only. A review is requested with POST /v1/approvals?post_id= and { "post_version", "mode": "schedule" | "publish_now", "scheduled_at", "timezone" }; it binds the post version, the mode, the time and zone and the requesting OAuth client (none for an API key), and lives 24 hours. A stale post_version is 412 post_version_mismatch (schedule) or 409 publication_approval_stale (approve).

Changed 2026-11: publishing carries no cost. estimate_id and max_total_cost are no longer part of the schedule, publish-now or approval-request bodies; a client that still sends them gets the same answer as without them (the members are ignored). Post targets no longer carry estimated_amount/estimated_currency, and approvals no longer carry estimate_id, max_total_cost, currency or preview.estimate.

Some networks require a person’s express consent before every publication. An API key (or an MCP client) never gives that consent: only a person does, in the web app or on a review page.

Network Consent before each publication
YouTube yes
TikTok yes
Instagram no
Bluesky no

Do not hard-code this table: read requires_consent on the network catalog (GET /v1/connectors) or, for one connected account and format, on GET /v1/connections/{id}/requirements?format=.

consent_confirmed counts only for a person in the web app. When an API key sends consent_confirmed: true, the field is ignored (not refused) and the answer is the same as without it. To publish a post with a consent-requiring target, a key follows these steps:

  1. Call POST /v1/posts/{id}/schedule or POST /v1/posts/{id}/publish without authorization_reference. Nothing is scheduled. The answer is 403 publication_approval_required with an action object:

    {
    "code": "publication_approval_required",
    "message": "This action needs the user's review in the app before it can run.",
    "retryable": false,
    "correlation_id": "0f6c…",
    "action": {
    "kind": "requires_user_action",
    "authorization_reference": "5d1e…",
    "review_url": "https://app.example.com/approvals/5d1e…",
    "expires_at_utc": "2026-11-21T12:00:00Z"
    },
    "errors": { "Messages": ["This action needs the user's review in the app before it can run."],
    "Codes": ["Publication.Approval.Required"] }
    }
  2. Send review_url to a member of the workspace who may approve posts. The review lives 24 hours (expires_at_utc). Repeating the same call while the review is pending returns the same authorization_reference.

  3. The person opens review_url, checks the content, the accounts and the time, and approves. Approving gives the consent for exactly those targets, for this one request. The person can also reject.

  4. Repeat the same call with authorization_reference set to the reference, before expires_at_utc. The answer is 202. The reference is single use.

You can also ask for the review first, with POST /v1/approvals?post_id= (see above), and pass its id as authorization_reference in step 4. Both ways produce the same review; the 403 is the simpler one, because it needs no extra call when no review is needed.

An approval binds the post version, the mode (schedule or publish_now), the time and the time zone. So:

  • an edit of the post drops the consent; the approval can no longer be used, and the post needs a new review;
  • a call with another time, zone or mode than the approved one is 409 publication_approval_mismatch: call again without authorization_reference to get a new review;
  • a reference that expired gets a new 403 with a new review, and one still pending gets the 403 again with the same reference; a rejected one is 409 publication_approval_not_approved (a person said no);
  • a key that moves a post scheduled under an approval does not reuse that consent: the post is held for a new review (see Held for review).

A post with no consent-requiring target publishes from an API key with no person involved, unless the workspace requires a teammate’s review of posts written by editors: then the answer is the same 403 and the same steps apply.

Plan for it: an unattended integration cannot publish to YouTube or TikTok. A person must approve each post, within 24 hours of the request.

POST /v1/posts/{id}/reschedule (scope posts:publish) moves a scheduled post to another time in place: no cancel, no reopen, no new schedule. It follows the PATCH convention: If-Match carries the post version (missing → 428 common_if_match_required, stale → 412 post_version_mismatch), and the answer is 200 with the post and its new ETag (the version is bumped by one), or 202 when the new time needs a person’s review and the post is held (see “Held for review” below).

{ "scheduled_at": "2026-11-20T09:00:00-03:00", "timezone": "America/Sao_Paulo", "consent_confirmed": false }

The time rules are the schedule’s: scheduled_at is the wall time in timezone with that zone’s offset at that time (400 post_schedule_offset_mismatch, target scheduled_at), timezone is a required IANA id (400 post_schedule_timezone_required / post_schedule_timezone_invalid), and the instant may not be more than one minute in the past (422 post_schedule_in_past). DST gaps and overlaps resolve as for scheduling.

When it is allowed (otherwise 409 post_reschedule_not_allowed, the blocking status in the error state):

  • the post is scheduled and not held for review (a held post answers 409 post_reschedule_not_allowed with current_status AwaitingReview: cancel it to withdraw the request);
  • every target that is not cancelled is scheduled, was never attempted (attempts = 0), has not reached the network (no external reference) and is not processing;
  • its publishing has not started. If publishing starts between your read and the save, the reschedule answers 409 common_conflict, so a target never publishes at the old time while the post shows the new one.

The reschedule window. A post can be rescheduled only up to 60 minutes before its current scheduled time, for every caller (web app, API key, MCP client). The cutoff uses the time the post holds now, never the requested one: at 13:30 a post due at 14:00 cannot be moved to tomorrow, and a post due at 14:00 moved at 12:30 to 12:45 is accepted (its new cutoff, 11:45, has then passed). Exactly 60:00 before is still allowed; 59:59 before is refused with 409 post_reschedule_window_closed, whose current_status carries the cutoff instant (ISO 8601 UTC, for example 2026-11-20T13:00:00.0000000Z). The post can still be cancelled (then reopened, edited and scheduled again). The checks run in this order: the state rules above (409 post_reschedule_not_allowed), the If-Match (412), then the window. The window is checked before the new time is resolved (an unknown timezone, an offset mismatch, an instant in the past) and before the early-access check (connector_early_access_required), so a closed window answers 409 post_reschedule_window_closed even when the new time is invalid; only a missing scheduled_at or timezone (request validation) is reported first. Consequences: a post scheduled less than 60 minutes ahead, publish-now included, is never reschedulable; and a publication delayed by a paused network or a rate limit (which happens only once it is due) is past its cutoff too, so it is cancelled, not moved.

Every post read carries reschedule_until_utc: the last instant (UTC, inclusive) a reschedule is accepted, that is the current scheduled time minus 60 minutes. It is omitted (null) when the post is not reschedulable by state (not scheduled, or a live target that started). Clients show or hide the action from this field and never hard-code the lead; a window that closes between the read and the request is still refused with 409 post_reschedule_window_closed.

The If-Match is checked again when the change is saved: the save applies only while the post still holds that version and its live targets are still scheduled. So of two reschedules sent with the same If-Match only one succeeds (the other gets 409 common_conflict, or 412 if it read the new version), and a cancel committed after the read makes the reschedule 409 common_conflict instead of resurrecting a cancelled target.

What changes: scheduled_at, timezone, version, updated_at, and the time of the queued publishing (moved in the same change, never duplicated). What stays: the content, the targets and their options, the last editor, and cancelled targets. Webhook subscribers receive post.rescheduled (see the Webhooks guide).

Approval and consent. A publication approval binds the post version and the time, and consent is given only by a person in the web app or by a consumed approval. So the new time needs a person’s review when:

  • the version was last edited by an editor in an organization that requires approval (for every caller, a web app user included);
  • an API key moves a post whose live target carries consent or that was scheduled under an approval (a key never consents);
  • an OAuth client (MCP, tool reschedule_post) moves any post.

A web app user otherwise keeps their own consent; a consent stamped by a review-page approval counted only for that approval’s time, so the user re-confirms it with consent_confirmed: true (otherwise 400 publication_consent_required, target consent_confirmed), which re-stamps those targets in their name, as a new schedule would after an edit. A post that needs no review moves at once with 200, as before.

When the new time needs a review the request is not refused: the post is held in the same transaction, provided the new time is at least 60 minutes ahead of the request (the review must have time to be decided: it expires at the new time). A sooner new time is refused with 409 post_reschedule_review_too_soon (target scheduled_at, current_status = the earliest accepted instant, ISO 8601 UTC) and nothing changes: the post keeps its time and nothing is held. A move that needs no review has no such minimum. It takes the new scheduled_at/timezone and a new version, its queued publishing waits for the review at the new time, and a review (an approval with mode: "reschedule") is created, bound to that version and to the caller’s OAuth client (none for an API key or the web app). While held, the post publishes at neither the old nor the new time until the review is decided. Consent and content stay as they were. The answer is 202 with the held post, its new ETag, Location: /v1/approvals/{review id} and the requires_user_action action a person must open:

{
"id": "7b0c…", "version": 4, "status": "scheduled",
"scheduled_at_utc": "2026-11-21T12:00:00Z", "timezone": "America/Sao_Paulo",
"held_for_review": true, "review_approval_id": "c41e…",
"targets": [ … ], "media": [], "deletable": false,
"action": { "kind": "requires_user_action", "authorization_reference": "c41e…",
"review_url": "https://app.example.com/approvals/c41e…", "expires_at_utc": "2026-11-21T12:00:00Z" }
}

reschedule_until_utc is omitted while held (no reschedule is accepted); every post read carries held_for_review and, while true, review_approval_id. The approvals read (GET /v1/approvals/{id}, the inbox) shows the review with mode: "reschedule", scheduled_at/timezone = the requested time and previous_scheduled_at (UTC) / previous_timezone = the time it replaces.

The review is decided on the review page by a member with posts:approve (the four-eyes rule of team reviews applies unchanged):

  • approve: the click applies the new time in one commit: the review is approved and consumed at once, every consent-requiring live target is stamped with the approver’s consent bound to that review, publishing is queued again at the new time, the hold is cleared and the version bumped. Subscribers receive post.rescheduled (with the previous time);
  • reject: the whole post is cancelled (every live target cancelled);
  • no decision: the review expires at the new requested time, and never later than 7 days after the request; the post is then cancelled exactly as a rejection would, by a background check that runs every minute by default. An expired review can no longer be approved, so the post never publishes in between.

There is no withdrawal: the requester cancels the post (POST /v1/publications/{id}/cancel), which cancels the held publishing, ends the hold and closes the pending review (it reads expired). A second reschedule while held is 409 post_reschedule_not_allowed (current_status AwaitingReview). Concurrent decisions are safe: the review’s version and the post’s guarded update let only one of two approvers, an approval and a cancel, or an approval and the expiry win; the loser gets 409 common_conflict or 409 publication_approval_not_decidable/publication_approval_stale. The hold has no webhook event: it is announced by e-mail only (below). A cancellation by the review (cause rejected or expired), like every cancellation, has no webhook event either.

E-mail alerts (best-effort, never part of the decision):

  • when a post is held: to the organization’s owners and admins and the post’s author, except a requester the four-eyes rule stops from approving (the version’s last editor in a team review). It names the workspace, the accounts, the previous and the requested time and the expiry in the reader’s time zone, says the post will not publish until approved and is cancelled if rejected or not reviewed in time, and links the review page. It is skipped at send time once the review is no longer pending;
  • when a rejection or an expiry cancels the held post (not when the requester cancels it): to the author and to the requester when they asked in the web app. It names the workspace, the accounts, the time the post was to be published and the reason (rejected / not reviewed in time) and links the post. Both carry no post content.

Two times can apply to a YouTube target:

  • scheduled_at on the post: when the video is uploaded to YouTube;
  • publish_at in the target’s options: when YouTube makes the video public. Until then YouTube keeps it private.
{ "privacy_status": "private", "made_for_kids": false, "publish_at": "2026-11-20T18:00:00-03:00" }

publish_at is optional. It is an ISO 8601 instant with an offset or Z; a date or a time without an offset is 400 post_target_options_invalid (target options.publish_at). It is accepted only when privacy_status is private, and it must be at least 15 minutes and at most 180 days after the upload time (the scheduled time, or now for publish-now). Otherwise the answer is 422 connection_you_tube_publish_at_invalid, target targets[i].options.publish_at, for every caller (web app, API key, MCP client), at schedule, at publish-now, when a review is requested and when it is used.

For publish-now the upload time is the moment the publish happens. Through a review, that is the moment the approval is used, not the moment it was requested: a review requested with publish_at 30 minutes ahead and used 20 minutes later is refused with 422 connection_you_tube_publish_at_invalid. The approval stays approved but can no longer be used; edit the draft (a new publish_at) and request a new review. The review page shows a warning only when, at the moment the page is viewed, publish_at is already less than 15 minutes away; a review approved later than that is refused all the same.

The target reads published (with published_at) once YouTube has received and processed the upload, even while the video is still private and waiting for publish_at. A post.published webhook means the upload is done, not that the video is public.

A reschedule keeps the options: a new scheduled_at less than 15 minutes before publish_at (or after it) is refused with 422 connection_you_tube_publish_at_invalid and nothing changes. To move publish_at itself, cancel the post, edit the draft and schedule it again; the edit drops the consent and any earlier approval of that draft (a new version).

A video is never uploaded once its publish_at has passed, because YouTube would make it public as soon as it is processed. If publishing is delayed until publish_at or later (for example a paused network or a rate limit), the target fails with last_error Connection.YouTube.PublishAtPassed (code connection_you_tube_publish_at_passed), nothing is uploaded, and the failed-target e-mail names the reason. Choose a new time and publish again (cancel or reopen the post, edit the draft, schedule it). While the delay lasts the post simply waits; the refusal happens only when the upload would start. Only a time that has already passed when the upload starts is refused: an upload that starts shortly before publish_at is sent, and YouTube then makes the video public once it has processed it, which can be a little after the chosen time. If YouTube refuses the value, the target fails with last_error rejected:invalidPublishAt and nothing was uploaded.

On Instagram, a Reel’s cover frame is the option thumb_offset: an integer number of milliseconds from the start of the video. A value that is not a whole number from 0 to 2147483647 (a negative or fractional number, a larger number, a string) is refused when scheduling, when a review is requested and when the post is rescheduled, with 400 post_target_options_invalid, target targets[i].options.thumb_offset; POST /v1/posts/{id}/validate answers the same code with target options.thumb_offset. An offset past the end of the video is refused by validate with the same code and, if the post was scheduled anyway, fails the target at publish with last_error Post.Target.Options.Invalid before anything is sent to Instagram. On an image a valid value is ignored; a malformed one is still refused.

A Reel can use one of your images as its cover instead of a frame: upload the image through /v1/media like any other media, wait until it is ready, then name its id in the Instagram target’s options.

{ "cover_media_id": "3f0c2d1e-8a4b-4c5d-9e6f-7a8b9c0d1e2f" }
  • The image is not part of the post’s content: media_ids still holds the video (a post keeps at most four images or one video), and media in every read lists the content only. The id stays readable in the target’s options.
  • It must be a ready image of the same workspace and product (404 media_not_found for an unknown id or another product, 422 media_not_ready while it is processing), and not one of the post’s media_ids (400 post_target_options_invalid). These answers point at targets[i].options.cover_media_id.
  • cover_media_id and thumb_offset are never sent together (400 post_target_options_invalid on targets[i].options.thumb_offset); a cover on an image target is refused the same way on options.cover_media_id.
  • Instagram receives the image’s JPEG rendition (sRGB, at most 1440 px wide; at most 8 MB). Instagram crops the centre 9:16 for the Reel and the centre square for the profile grid, so a 1080 × 1920 image works best.
  • The image is kept while the post can still be published and is released with the post’s media once the post is finished (see Media retention): it leaves GET /v1/media and is deleted after the same retention. Removing the option from the draft releases it like any unused image.
  • The option belongs to the target: a PATCH that changes media_ids without sending targets keeps each target’s options. If the post becomes an image post, a kept cover_media_id is refused when you schedule (400 post_target_options_invalid on targets[i].options.cover_media_id): send the targets again without it.
  • POST /v1/posts/{id}/validate and the review page show the image; the publication preview lists it under the target’s attachments (key, media_id, width, height, status).
  • If the image is deleted or no longer usable before the post is published, scheduling is refused with 404 media_not_found (or 422 media_not_ready), and a post already queued fails that target with last_error media_not_ready before anything is sent.

A YouTube video can use one of your images as its custom thumbnail in the same way: name the image’s id in the option thumbnail_media_id.

{ "privacy_status": "private", "made_for_kids": false, "thumbnail_media_id": "3f0c2d1e-8a4b-4c5d-9e6f-7a8b9c0d1e2f" }
  • The same rules apply as for a cover (a ready image of the workspace and product, not one of media_ids, kept until the post is finished). The image must be at least 640 px wide (400 post_target_options_invalid on options.thumbnail_media_id); YouTube recommends 16:9, 1280 × 720 or larger.
  • YouTube sets the thumbnail after it has processed the video, so the target reads published once the thumbnail is set or could not be set. With privacy_status public the video may be public with YouTube’s automatic thumbnail for those few minutes: use private with publish_at when that matters.
  • The video is published even when the thumbnail could not be set, and it is never uploaded again for it. Read the publication’s steps (GET /v1/publications/{id}): the step thumbnail reads pending or sending:<n> while it is on its way, set when YouTube accepted it, or failed:<code> when it could not be set: forbidden (the channel may not set custom thumbnails: custom thumbnails need a verified YouTube channel, and YouTube limits how many a channel sets per day), invalid_image, video_not_found, quota (the daily YouTube quota of the service is used up), rate_limited (the channel reached YouTube’s daily limit for custom thumbnails), attempts (YouTube did not confirm it after the allowed attempts: the last answer may have been lost, so the thumbnail may or may not be set), unauthorized (reconnect the account), image_missing (the image was gone), timeout (it could not be set while the publication was still being followed) or rejected. More codes may be added later. No webhook event or e-mail is sent for a thumbnail that could not be set.

DELETE /v1/posts/{id} (scope posts:write; the member’s role decides as for an edit) removes a post from every user read. It follows the PATCH convention: If-Match carries the post version (missing → 428 common_if_match_required, stale → 412 post_version_mismatch). Success is 204 with no body.

It is a soft delete: the post is marked deleted (by whom and when) and the version is bumped; nothing is physically removed (its targets, publishing history, approvals, collected metrics, media references and audit history stay). Media assets used only by finished posts are the exception: a deleted post counts as finished, so an asset no live post uses leaves GET /v1/media at once and is deleted 3 days (by default) after the deletion (see Media below). A deleted post is hidden from GET /v1/posts (items, total, every status and calendar window), GET /v1/posts/{id}, GET /v1/publications/{id}, analytics, approvals (list, read, decide: 404), MCP tools and the workspace export.

When it is allowed (otherwise 409 post_delete_not_allowed, the status in the error state):

  • the post is draft, cancelled or failed;
  • no target is in flight (publishing, processing, unknown);
  • no target reached, or may have reached, a network: none is published or needs_review, holds an external reference or a publish time (such a post is history);
  • no publishing is queued, running or waiting for a review (the same rule as a reopen).

The same rule holds for an edit: a failed post that has a target in needs_review cannot be edited or reopened (409 post_not_editable), because that target may have reached the network.

A scheduled post is refused: cancel it first (POST /v1/publications/{id}/cancel, posts:publish; a cancel does not bump the version), then delete it. scheduled, publishing, partially_published and published posts are never deleted. An already deleted post, or one of another organization, is 404 post_not_found.

Every post read carries deletable (boolean): true when the post’s own state allows the delete (the first three rules). Publishing that is still queued refuses the delete with 409 even then.

The If-Match is checked again when the delete is saved, so a schedule or an edit committed after the read makes the delete 409 common_conflict. A pending approval is not changed (as for an edit or a cancel): it binds the old version and is no longer found. There is no webhook event and no MCP tool for a delete.

A post’s media is kept only while a post may still need it. The delays and the hourly interval in this section are the current defaults. Each post that uses an asset is classified:

  • finished: soft-deleted, or published / partially_published with no target in needs_review and none live;
  • closed (it can still change), with no live target: failed or cancelled (a reopen), or a target in needs_review (a human may still settle it; published + needs_review reads partially_published, needs_review alone reads failed);
  • pinning: a live target, that is one that is not terminal (pending, scheduled, publishing, processing, unknown), whatever the post status (a scheduled post with one target in needs_review and a sibling still scheduled pins), or any other post status (draft, scheduled, publishing).

Rules:

  • A ready asset is released when at least one post uses it and every such post is finished. GET /v1/media (and MCP list_media) stops listing it at once; GET /v1/media/{id} still reads it until it is deleted, and attaching it to a new draft by id pins it again. Closed posts never hide an asset from the list.
  • An hourly background job deletes the asset when every post satisfies its own delay: a finished post 3 days after it got there (its last status change, or its deletion), a closed post 3 days after its last status change. A pinning post blocks the deletion. The cut-offs are inclusive. The job then removes the files and lowers the storage usage.
  • Before deleting, the job reads the asset’s posts again and waits for an attach that is in progress, so an asset attached to a draft at that moment is kept.
  • Removing a released asset from a draft gives it no grace: if the remaining posts already satisfy their delays, the asset is deleted at the next hourly run.
  • Storage usage (GET /v1/media/usage) still counts a released asset until the job deletes and purges it, up to 3 days plus one hourly run after it left the list.
  • The post keeps its media entries (media ids) after the deletion and still reads; reopening a failed/cancelled post whose asset is gone answers media_not_found, the approval preview shows the media as deleted, and the workspace export skips the file. Assets no post ever used are deleted once they are 30 days old.

Changed 2026-11: GET /v1/publications/{id} (the post id) no longer returns targets[].receipt_json (the network’s private receipt). last_error on a target (posts and publications) is a known code (an API error key such as Publication.ProcessingTimeout, or a publishing reason such as timeout or deferred:paused), or reason:detail where the detail is a short token of letters, digits and _ (at most 34 characters, for example rejected:invalid_params), an Instagram numeric code/subcode (media_rejected:100/2207026), or one of our own API error keys (these contain dots). Any other detail from the network is replaced by withheld (invalid_request:withheld), and a value that fits none of these shapes is returned as provider_error. A short token the network chose (an error name such as InvalidRecord) can therefore still appear.

source_url on a media asset is the import address without its query string, fragment and user information (scheme, host, port and path), so a signed URL’s query signature is never returned. The path is kept as sent: a secret carried inside the path itself (a signed path segment, a ; parameter, an encoded %3F…) is not removed.

The same values come back from the MCP tools and in the workspace export.