The playbook
Book a post for a set time on the networks the user picks, and manage what is already on the calendar.
If the plan has several workspaces, call workspaces_list first and ask which one, then pass workspace=<id> to every tool below.
1. Where it goes
list_accounts: the connected accounts and their platforms. If the user names a network that isn't connected, offer get_connect_link for it and stop there. When a network has several connected accounts (an à la carte plan with 5 Instagram accounts), ask which ones: create_post needs account_ids then.
get_account_health (no params) for anything that needs reconnecting before the post time. A post scheduled on a broken account fails at publish time.
2. The media
- A public file URL (it must serve the file, not a page):
upload_media_from_urlwithurl, keep themed_id. - A file the user has (attached, on their computer):
create_upload_link(filename), give themupload_page, wait until they say it's done, thenget_uploadwithupload_idfor themed_id. Several files at once:filenames. - Text only (X, Threads, LinkedIn, Facebook): no media needed.
Media rules: one video, or up to 10 images for a carousel. TikTok and YouTube need a video. Check the caption with check_caption_length (text) when it goes to X (280) or Threads (500).
3. The time
If the user gave a time, use it and ask their timezone if it isn't clear. If not, call get_best_time_to_post (optionally platform or account_id) and suggest the next slot from it. Say it comes from their own past performance, and if it returns nothing (a new account) say so and suggest a normal time instead.
4. Confirm, then book
Show the plan: networks and accounts, the caption (first lines), the media, post_type if not obvious, the time with its timezone. Ask for a yes. Then create_post with:
platforms,content,media,schedule_at(ISO 8601),timezone(IANA, e.g. America/New_York; UTC if left out)account_idswhere a network has several accountstitlefor YouTube,coverfor videos,hashtagsif they want them appended- optional:
first_commentfor a link (see/first-comment),collaboratorsfor an Instagram Collab (see/collab-post),trial_reelfor an Instagram Reel
Then get_post with the returned post_id and show its per-platform status.
5. Manage the calendar
- See what's booked:
list_postswithstatus: "scheduled"(andfrom_date/to_date,platform). - Move or edit:
update_postwithpost_idand the newschedule_at+timezone,content,mediaorcover. Show the change first. - Post it right now:
update_postwithpublish_now: true, after a yes. - Cancel:
delete_postwithpost_id, only after the user confirms (it won't go out).
6. Report
One line per post: networks, time in the user's timezone, status. Offer /draft-post to park ideas, or /post-everywhere when one video should go to every network in its own shape.