Publish a prepared post
publish_postSends a post staged by prepare_post, or schedules it. Irreversible: the post goes out under the user's own name and cannot be taken down from aicut. It is for a post the user has confirmed: either in chat, after a question that named the account, the text, the visibility and any scheduled time (a bare 'yes' confirms only when that question about this post was the message immediately before it), or in the publish card opened by review_post. A card confirmation arrives as a chat message that includes the id of the post the card staged from the user's choices; that is the post_id to send. The caption, visibility and disclosure are fixed when the post is prepared and cannot be changed here. schedule_at is the one field that can differ from what the user approved: it changes the publish time, so set it only when the user asked for a different time after confirming. WHEN: after prepare_post, once the user has chosen and confirmed. IT NEVER ANSWERS posted, and that is the truth, not a delay: TikTok answers publishing (the platform downloads the video itself, which can still fail); YouTube and Instagram answer submitted (aicut's poster has it, nothing is confirmed); a scheduled post answers scheduled. Poll get_post_status until posted or failed; never tell the user their video is live on the strength of this call. SCHEDULING: schedule_at sets or moves the time, null sends a post prepared for later now. A scheduled TikTok or Instagram post waits in aicut (the scheduler fires every due post at once, so a schedule can be REFUSED with retry_after_seconds meaning 'move it at least this many seconds later'); a scheduled YouTube post is uploaded at once as private and published by YouTube, so it stays scheduled with a post_id you can hand the user. THE POSTING LIMITS, so you can pace a batch instead of discovering them: per CONNECTED ACCOUNT, tiktok 5/min and 13/24h, youtube 2/min and 10/24h, instagram 4/min and 45/24h. Both windows are ROLLING (the 24h one does not reset at midnight). Over the limit you get a 429 (post_rate_limited or daily_post_limit) with retry_after_seconds: respect it, and do not prepare a second post or use a second account to get around it. A slot is taken only by a call that reaches the platform, so every refusal raised before that point is FREE (a 400, 404, 409 already_published / post_expired / consent_required / video_not_ready, a 403 insufficient_scope, a TikTok preflight failure): fix it and retry at once. prepare_post is a separate meter (5/min, 100/24h per connected account). Scheduling spends the same allowance, counted around the scheduled time. 403 insufficient_scope = the user's connection lacks the social:publish permission: not a bad video_id or account_id, and a retry cannot fix it. Tell them to disconnect and reconnect aicut at https://www.aicut.pro/account/settings#connections (the full steps are in prepare_post's REFUSALS), then STOP. A 403 here posted NOTHING: the request never reached the platform, so say plainly that the video did not go out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | Yes | The `id` returned by `prepare_post`. | |
| schedule_at | No | ISO-8601 time to publish at, at least 10 minutes ahead; overrides what `prepare_post` recorded. Null sends the post now. Omit to keep the prepared time. |