Publish an Instagram Post
From Library media to a published or scheduled post, with your approval.
Tools
list_workspaces, list_media, prepare_post, confirm_post, list_posts, get_post, prepare_post_update, cancel_scheduled_post.
Steps
list_workspaces(): theworkspaceIdto post in.list_media(workspaceId, kind: "image", q: "class"): find the media. Posts can only use Library media, bymediaId.prepare_post(workspaceId, mediaIds: ["…"], caption: "…", scheduledAt: "2026-11-10T18:00:00-03:00"): returns a preview and apendingId. Nothing is posted.- Show the preview: media, caption, account and time. Ask the person to approve it.
- Only after a clear yes:
confirm_post(pendingId). It posts in the workspace the preview was prepared in. Within 10 minutes of the preview; after that, prepare it again. list_posts(workspaceId, status: "scheduled")shows the post; after publishing,list_postscarries its permalink.
Change of plans
prepare_post_update(workspaceId, postId, caption: "…", scheduledAt: "…") previews a change to a scheduled post; give only what changes. For a failed post, the same call with no changes retries it. cancel_scheduled_post(workspaceId, postId) previews cancelling it. Both act only after the person approves and the app calls confirm_post(pendingId).
What could go wrong
| Answer | What to do |
|---|---|
| A story or reel with several media | Stories and reels take one media; a reel needs a video |
The pendingId expired | Call prepare_post again and show the new preview |
| The workspace has more than one Instagram account | Pass accountId (from get_workspace) |
| Your seat has view-only access to Work | Ask an owner or admin to change your role in Betterness One |
A post in failed status | get_post carries the error; prepare_post_update retries it |
| A demo workspace | Posts cannot be published, changed or cancelled there; the preview says so |

