Pages in MCP

Create and update posts

Start with platforms_list: it returns each platform's text limit, media rules, required media metadata, placements and the JSON Schema of its options. Then call posts_create with targets (platform sets, each with platform names: instagram, facebook, linkedin, tiktok, threads, twitter, discord, telegram, bluesky, youtube, pinterest), text, optional linkUrl and media, and per-platform options. Ampost picks each platform's account from its platform set, so you never pass account ids. To post to several accounts of the same platform, add a target for each account's set. To check a post first, send the same request to posts_validate: it creates and counts nothing and answers, per platform, whether posts_create would accept it, with the same error codes, warnings and the media conversion Ampost would do.

posts_create
{
  "targets": [
    {
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "platforms": [
        "instagram",
        "facebook"
      ]
    }
  ],
  "text": "Launch day: Ampost publishes everywhere from one API.",
  "firstComment": "Pricing and docs: https://ampost.io",
  "media": [
    {
      "url": "https://cdn.example.com/launch.mp4",
      "type": "video",
      "mimeType": "video/mp4",
      "sizeBytes": 18200000,
      "width": 1080,
      "height": 1920,
      "durationSeconds": 21
    }
  ],
  "options": {
    "instagram": {
      "placement": "reel"
    },
    "facebook": {
      "text": "Launch day. Here is what we built and why."
    }
  },
  "publishNow": true,
  "metadata": {
    "campaignId": "launch-2026"
  }
}

Media

media items are public https URLs (no localhost, private or internal hosts) with a required type (image or video). TikTok needs width, height and, for video, durationSeconds; every platform's needs are in media.requiredFields.

Ampost fits media to each platform's rules (media.conversion) before it publishes. Media within these rules is sent as it is; anything else is converted to fit them, video to H.264/AAC MP4 and images to JPEG, PNG or WebP, whichever the platform takes. mediaFit sets how media outside a platform's aspect ratio is fitted: pad (default), crop or none. Each account's mediaTransforms says what changed. Videos are never trimmed.

Drafts and scheduling

Without scheduledFor the post is a draft: publish it with posts_publish, or pass publishNow: true. A scheduled post's media is copied to Ampost storage right away.

Safe retries

Pass a new idempotencyKey (a UUID) to posts_create, posts_import_csv, posts_publish, posts_retry, posts_approve, accounts_connect, platform_sets_create, webhooks_create and feedback_submit, and the same key when you retry a call that timed out. A retry with the same key and the same arguments within 24 hours returns the first result without creating or publishing again. The same key with different arguments gets IDEMPOTENCY_KEY_REUSED; use a new key for a new action.

Many posts from CSV

To create many posts, pass CSV text to posts_import_csv: one post per row, in the columns of the dashboard's CSV export. Call it with dryRun: true first, fix the rows it reports, then import with an idempotencyKey.

TikTok

TikTok posts need media, and two choices the user makes: options.tiktok.privacyLevel, one of the creator's allowed levels (see platformMetadata from accounts_get; there is no default), and options.tiktok.consent: true, after you tell the user that by posting they agree to TikTok's Music Usage Confirmation (and Branded Content Policy with brandContentToggle). Comments, Duet and Stitch stay off unless the user turns them on with disableComment: false and so on. Disclose commercial content with brandContentToggle (a third party, never private) or brandOrganicToggle (the creator's own business). Private-only is normal while a TikTok app is in review.

LinkedIn and TikTok are coming soon: until they open, posting to them answers PLATFORM_COMING_SOON. LinkedIn will publish as the member, with no organization pages or analytics.

posts_create: TikTok (coming soon)
{
  "targets": [
    {
      "platforms": [
        "tiktok"
      ]
    }
  ],
  "text": "Behind the scenes #buildinpublic",
  "media": [
    {
      "url": "https://cdn.example.com/launch.mp4",
      "type": "video",
      "mimeType": "video/mp4",
      "sizeBytes": 18200000,
      "width": 1080,
      "height": 1920,
      "durationSeconds": 21
    }
  ],
  "options": {
    "tiktok": {
      "privacyLevel": "PUBLIC_TO_EVERYONE",
      "consent": true,
      "disableComment": false,
      "isAigc": false
    }
  }
}

First comment and threads

firstComment is posted on each new post after it publishes (a reply on X, Threads and Bluesky; not on TikTok, Telegram, Discord or Pinterest). A failed comment leaves the post published; posts_retry posts only the comment again.

thread adds follow-up posts on X, Bluesky and Threads, each a reply to the one before (text, media or both per item; not with a first comment on the same platform). A failed item fails the account with the item's index; posts_retry continues from that item without posting the earlier ones again.

Several accounts of one platform

posts_create: two Facebook Pages
{
  "targets": [
    {
      "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "platforms": [
        "facebook"
      ]
    },
    {
      "platformSetId": "9a4f2c7e-1d3b-4a6e-8c5f-2b7d9e1a3c50",
      "platforms": [
        "facebook"
      ]
    }
  ],
  "text": "We are hiring two engineers. Apply by Friday.",
  "linkUrl": "https://example.com/jobs",
  "publishNow": true
}

After publishing

The result is the Post: check platformPosts[].status and error for each account, and call posts_retry for failures (all failed accounts, or the accountIds you pass). To take a published post down, call posts_unpublish: each account turns deleted, or stays published with a notice saying why (Instagram and TikTok have no delete API). To fix the text of a published post, call posts_edit_published with the new text (Facebook, LinkedIn, Telegram, Discord, and the description on YouTube and Pinterest). Each edited account's text holds it; a refused one keeps a notice.

Update a post

posts_update changes a draft or scheduled post. Pass postId and only the fields to change; media and targets replace the whole list, and options is merged per platform. New targets re-resolve the accounts from their sets (accounts the post keeps keep their results), and scheduledFor: null turns a scheduled post back into a draft.

posts_update (plus postId)
{
  "text": "Launch day (updated): Ampost publishes everywhere from one API.",
  "scheduledFor": "2027-01-12T08:00:00Z"
}