apitiktokpublishingscheduling

TikTok Publishing API Guide for Developers

Ampost Engineering·
Hero image for TikTok Publishing API Guide for Developers

TikTok Publishing API Guide for Developers

Teams looking for a TikTok publishing API usually want more than a way to send a video URL to a social network. They need a backend contract that can accept creator-approved media, validate TikTok-specific rules before publish time, preserve media for scheduled jobs, and keep app-review limits visible to the product team. Ampost is built for that kind of workflow.

If you are evaluating the platform-specific surface first, start with the TikTok API solution page. This guide explains the implementation intent behind that page: what your request should include, why explicit media metadata matters, how scheduled TikTok posts stay reliable, and where the REST and MCP surfaces fit.

What a TikTok publishing API has to handle

TikTok publishing is media-first. A text-only post is not a valid TikTok publish request in Ampost, so your integration should treat media as the center of the payload rather than an optional attachment. The post can be a single video or a photo post, but it should not mix photos and videos in the same TikTok request.

Ampost expects explicit media descriptors for TikTok instead of bare URL lists. That means each media item should carry its URL, type, MIME type, file name, file size, width, height, and duration when it is a video. The reason is practical: the post engine can reject invalid media before a user schedules a job or an agent commits to a campaign. For example, TikTok video validation needs known dimensions and duration, while photo validation needs known image dimensions and file size.

Here is the shape developers should model:

{
  "content": {
    "text": "Launch clip for the new feature",
    "media": [
      {
        "url": "https://cdn.example.com/launch.mp4",
        "type": "video",
        "mimeType": "video/mp4",
        "sizeBytes": 18432000,
        "filename": "launch.mp4",
        "width": 1080,
        "height": 1920,
        "durationSeconds": 24
      }
    ],
    "platformOverrides": {
      "tiktok": {
        "settings": {
          "privacyLevel": "SELF_ONLY",
          "disableComment": true,
          "brandContentToggle": true
        }
      }
    }
  },
  "platforms": ["tiktok"],
  "scheduledFor": null,
  "platformSetId": "set_uuid"
}

The REST API docs show the endpoint surface for POST /api/v1/posts, authentication, scheduling, and platform sets. If you are building through an agent runtime, the MCP server docs expose the same publishing ideas through tools such as posts_create and posts_schedule.

Video and photo requirements

For video posts, Ampost validates TikTok media as a typed video item. Use supported video MIME types such as video/mp4, video/quicktime, or video/webm, and include duration plus dimensions. TikTok generally performs best with vertical video, but the important API requirement is that your service sends enough metadata for validation to happen before the publish job starts.

For photo posts, keep the media collection image-only. Ampost validates photo MIME type, size, width, and height, then passes the post through the TikTok broker as a photo publish request. A carousel-style photo post should still be represented as explicit media items, not as a legacy mediaUrls array.

This explicit contract is especially useful when TikTok is only one target in a broader social workflow. The unified social media API architecture post explains how Ampost normalizes different platform constraints without hiding the details that matter for correctness.

Scheduling with Blob-backed media

Scheduled TikTok publishing has one extra reliability concern: the media URL you pass at creation time might not still be available when the scheduled job runs. Ampost solves that by copying scheduled media into Blob storage during post creation. The scheduled job then uses Ampost-managed media instead of depending on a temporary CDN link, expiring signed URL, or user-local upload session.

That matters for product teams and AI agents. A user can approve a TikTok post today, schedule it for next week, and expect the same validated media to be present when the broker publishes it. The getting started guide covers the broader create-and-schedule flow across platforms, while this TikTok-specific guide calls out the stricter media requirements.

Privacy controls and review caveats

TikTok creator publishing depends on creator settings and app state. Ampost reads creator metadata from the connected TikTok account, including available privacy levels, comment settings, duet settings, stitch settings, and maximum video duration. Your API request can then set privacy and interaction controls through platformOverrides.tiktok.settings.

The private-only caveat is important. During app review, Direct Post approval, or other TikTok launch states, a connected app may only be allowed to create private posts. Ampost does not pretend public posting is available when the connected account or app state says otherwise. It surfaces the available privacy options and returns actionable validation or provider errors when broader visibility is not available yet.

For production launches, treat this as a product requirement rather than an edge case. Store the selected TikTok privacy level, show users what visibility is currently available, and keep operational logs around failed publish attempts. That makes the path from private testing to public posting easier to audit.

REST and MCP integration paths

Use the REST API when your SaaS product, backend service, or internal workflow owns the publish flow directly. Use MCP when an AI agent needs to prepare captions, select platform sets, schedule posts, or check status through structured tools. Both paths should send explicit TikTok media metadata and both should respect creator privacy controls.

The practical sequence is:

  1. Connect the TikTok creator account in Ampost.
  2. Read or store the platform set your workflow should target.
  3. Upload or reference media with explicit type, MIME, size, duration, and dimensions.
  4. Set platformOverrides.tiktok.settings for privacy and interaction controls.
  5. Create the post immediately or send a future scheduledFor value.
  6. Track the normalized post status after creation.

That gives developers a repeatable TikTok publishing API without making TikTok a one-off integration project. Start from the TikTok solution page, keep the REST API documentation open for payload details, and use the MCP docs when agents need to manage the same workflow.