Skip to content
ShapelessAI← Back
Publishing

Plug a post once it takes off

Give a post up to 5 plugs, rules that act once it is live: when it reaches N likes, or M minutes after it went out (up to 7 days), comment under it or repost it, from the post's own account or another connected one.

View as Markdown

Each plug fires once and its outcome is kept on the post, and a webhook can announce it. Plugs work on X, Bluesky, LinkedIn, Threads, Instagram and Facebook posts; GET /api/platforms answers per platform whether an account can comment, repost or read likes, and on which platforms' posts it acts.

Part of Publish a post: the same call, one more field. Every field and refusal is on that page.

Ask in plain words

  • "when this hits 50 likes, comment with the signup link"
  • "repost my launch post from the company page an hour later"
  • "auto comment on my LinkedIn post when it takes off"

From an agent host (MCP)

Server: https://shapelessai.com/mcp (add it to your host).

  • posts_create: PUBLISHES CONTENT: puts a post you wrote on the rail for one connected account (connections_list), or with group for every account of a group (posts_setup lists groups and their defaults; the answer's posts lists each account's post, id and status are the first's), at a time, in the account's next free queue slot, or now. Optional tags, a saved signature, repeatEveryDays and shortenLinks. Read platforms_list first for the platform's limits and settings schema. Free plan: 10 posts a day and 60 a month, and X only once a day without links, because X bills per post (402 free_daily_cap / free_monthly_cap / free_x_daily_cap / free_x_link carry the reset time and what to do instead). Needs the publish scope.

From code (REST)

Bearer API key with the scope each call names (auth, OpenAPI).

  • POST /api/posts (publish scope): Queue a post: at a time, in the next free queue slot, or now, on one account (connectionId) or every account of a group (group: its id or name; the group's defaults fill what the post leaves out, and the answer is {group, posts, skipped?}). Optional tags, signature, repeatEveryDays and shortenLinks. Send an Idempotency-Key so a retry never makes a second post.
  • GET /api/posts/cap (read scope): The Free plan's day: how many posts already go out on the UTC day ?at= falls on, and the cap. Paid plans answer { cap: null }.

From a terminal (CLI)

  • shapeless posts create

Example

curl -s https://shapelessai.com/api/posts -H "Authorization: Bearer $SHAPELESS_API_KEY" -H "Content-Type: application/json" -d '{"connectionId":"<id>","postText":"We are live.","plugs":[{"when":{"likes":50},"do":"comment","text":"Thank you all."},{"when":{"afterMinutes":60},"do":"repost","connectionId":"<pageId>"}]}'
// MCP tool call
{ "tool": "posts_create", "arguments": { "connectionId": "<id>", "text": "We are live.", "plugs": [{ "when": { "likes": 50 }, "do": "comment", "text": "Thank you all." }] } }
shapeless posts create --to <connectionId> --text "We are live." --plugs '[{"when":{"likes":50},"do":"comment","text":"Thank you all."}]'

Where else

More in Publishing

Publish a post · Comment under a post, in a chain · Add alt text and pick a video cover · Use each platform's own post options · Repeat a post every N days · Count clicks with short links · Post to a set of accounts · Tag posts and sign them · Share a post preview · Get post events by webhook · Attach a sound to an Instagram Reel · Review the queue · Set the posting schedule · Answer comments and work the inbox

Every capability · Docs · /llms.txt