Connect an account
POST /social-accounts/connect answers a sign-in link. Open it in a browser, sign in to the platform and allow posting. handoff_url is the same sign-in as a QR code, for a person who is signed in to the platform on their phone. Both links last about 30 minutes (expires_at), so get a fresh one for each connect.
platform is tiktok, instagram or youtube. After the sign-in the browser lands on a plain “connected, you can close this tab” page (return_to: "page", the default), which suits an agent working for someone, or on the web app’s Settings › Accounts ("app"). The answer’s next says what to do in the meantime.
An agent can’t sign in for the person: send them the link and wait. Then list the accounts:
state is connected, needs_reconnect, paused_unpaid, disconnected or disconnected_unpaid. One with reconnect_url needs the person to sign in to the platform again (platforms expire sign-ins now and then); open that link the same way. DELETE /social-accounts/{social_account_id} disconnects one: its scheduled posts are canceled, and its past posts and their numbers stay.
Schedule a post
POST /posts takes what to post, the accounts and, optionally, a caption and a time. Leave at out to post now.
mediais a finished render ({"job_id": ...}, a render that has succeeded) or a file in your library ({"hash": ..., "type": "video"}, or"image"). It is checked when you schedule, so a bad id fails now, not at posting time.accountsis one or more social account ids, or{id, options}to set platform options for that account.atis an ISO time with a zone (Zor+01:00), up to a year ahead.idempotency_keymakes a retry return the same post instead of posting twice.
schedule_post tool with the same fields.
Platform options
Options are flat and per account. Each platform reads its own.
For each YouTube account, send
{id, options} with its own visibility choice. There is no default. Use private to limit viewing to the owner and people they invite, unlisted to let anyone with the link view, or public to make the video available to anyone. You can set visibility from the API, CLI, SDK or MCP without opening the editor. This does not override an account’s owner approval setting.
With the CLI, --options is a JSON file mapping account ids to their options. For the example above, put this in options.json:
Follow a post
GET /posts/{post_id} shows where it is. GET /posts lists your posts, the soonest scheduled first, then the newest; filter with state.
Each target in
targets has its own state (pending, publishing, published, failed or canceled), url and error, so one account failing doesn’t hide the others.
Change or cancel a post
Until a post goes out (while it isscheduled, pending_approval or paused_unpaid) you can move it, post it now or cancel it:
Read the numbers
GET /posts/{post_id}/stats answers, per account, the views, likes, comments, shares, saves, impressions and reach the platform reports, with captured_at. A number a platform doesn’t report is null. They are read about an hour, a day and a week after the post goes out, so early on they can be empty.
Approval before posting
Each account hasapprove_before_posting, off unless you turn it on. With it on, posts to that account wait as pending_approval until someone approves them; an approved post goes out at its time, or right away if that time has passed. Use it when an agent schedules posts and a person wants the last word.
When a payment is overdue
Nothing is lost when a payment is late:- From the first day, posts wait as
paused_unpaidinstead of going out. Your schedule, history and numbers stay. - After 7 days still unpaid, your accounts are disconnected.
- Once the payment is fixed, paused posts go out, and disconnected accounts come back with one sign-in from their
reconnect_url.
Errors
See Errors for the rest.