Taskwind
Start free trial

TikTok posting API: the Content Posting API explained

By Natnael Girma ยท Published

TikTok's posting API is the Content Posting API on developers.tiktok.com. It has two modes. Direct Post publishes a video or photo post straight to the creator's profile and needs the video.publish scope. Upload sends the video to the creator's TikTok inbox as a draft that they finish in the app, and needs video.upload. Until TikTok audits your app, everything you Direct Post is private (SELF_ONLY), only 5 users can post through your app per 24 hours, and their accounts must be private.

This guide covers both modes with curl from TikTok's Content Posting API docs, as of December 2026.

Direct Post or upload to inbox?

Direct Post Upload to inbox
Scope video.publish video.upload
Video endpoint /v2/post/publish/video/init/ /v2/post/publish/inbox/video/init/
Who presses publish Your app, after the creator confirms in your UI The creator, inside TikTok
Caption, privacy, interactions Set by your app in post_info Set by the creator in TikTok
Before audit Private posts only, 5 users per 24 hours The upload docs do not mention an audit
Main limit About 15 posts per creator per day, shared across all apps At most 5 pending shares per 24 hours
UX rules Strict (see below) Tell users to open the inbox notification

A simple rule: if your users expect the post to go live without opening TikTok, you need Direct Post and the audit. If you are building a tool that prepares videos, such as an editor or a clipping app, the upload flow is less work and the creator keeps the last word.

What you need

  1. A registered app on TikTok for Developers with the Content Posting API product added.
  2. For Direct Post, the Direct Post configuration turned on in the app settings.
  3. Approval for video.publish or video.upload. (Taskwind also requests user.info.basic to show the creator's name and avatar.)
  4. Each creator's authorization through TikTok's OAuth login, which gives you an access token and their open_id.
  5. For PULL_FROM_URL, a verified domain or URL prefix where your videos are hosted.

Tokens

As of December 2026, TikTok's token management page lists access tokens as valid for 2 hours and refresh tokens for 180 days. Each refresh returns a new refresh token, so replace the stored one every time. TikTok asks you to schedule refreshes from the expires_in and refresh_expires_in values in the response rather than hard-coding these lifetimes.

Step 1: Query creator info

Call this every time the creator opens your post screen. It tells you which privacy levels they can use, whether they have turned off comments, Duet or Stitch, and the longest video they can post.

curl --location --request POST 'https://open.tiktokapis.com/v2/post/publish/creator_info/query/' \
  --header 'Authorization: Bearer act.example12345Example12345Example' \
  --header 'Content-Type: application/json; charset=UTF-8'
{
  "data": {
    "creator_username": "tiktok",
    "creator_nickname": "TikTok Official",
    "privacy_level_options": ["PUBLIC_TO_EVERYONE", "MUTUAL_FOLLOW_FRIENDS", "SELF_ONLY"],
    "comment_disabled": false,
    "duet_disabled": false,
    "stitch_disabled": true,
    "max_video_post_duration_sec": 300
  },
  "error": { "code": "ok", "message": "", "log_id": "..." }
}

The privacy_level you send later must be one of privacy_level_options, or the post fails with privacy_level_option_mismatch.

Step 2: Direct Post a video

With PULL_FROM_URL, TikTok downloads the video from your verified domain:

curl --location 'https://open.tiktokapis.com/v2/post/publish/video/init/' \
  --header 'Authorization: Bearer act.example12345Example12345Example' \
  --header 'Content-Type: application/json; charset=UTF-8' \
  --data-raw '{
    "post_info": {
      "title": "this will be a funny #cat video on your @tiktok #fyp",
      "privacy_level": "MUTUAL_FOLLOW_FRIENDS",
      "disable_duet": false,
      "disable_comment": true,
      "disable_stitch": false,
      "video_cover_timestamp_ms": 1000
    },
    "source_info": {
      "source": "PULL_FROM_URL",
      "video_url": "https://example.verified.domain.com/example_video.mp4"
    }
  }'

The response is a publish_id, not a post. Publishing continues in the background.

To send the bytes yourself, use "source": "FILE_UPLOAD" with video_size, chunk_size and total_chunk_count. The response adds an upload_url, and you PUT each chunk to it in order:

curl --location --request PUT 'https://open-upload.tiktokapis.com/upload/?upload_id=67890&upload_token=Xza123' \
  --header 'Content-Range: bytes 0-30567099/30567100' \
  --header 'Content-Type: video/mp4' \
  --data '@/path/to/file/example.mp4'

post_info fields

From the Direct Post reference:

Field Notes
privacy_level Required. PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR or SELF_ONLY, limited to what creator info returned
title The caption, up to 2,200 UTF-16 runes. Hashtags and mentions are detected.
disable_comment, disable_duet, disable_stitch Interaction settings
video_cover_timestamp_ms Frame used as the cover. Defaults to the first frame.
brand_organic_toggle The creator is promoting their own business
brand_content_toggle Paid partnership for a third party
is_aigc Labels the video as AI-generated

Photo posts

Photos use a different endpoint, /v2/post/publish/content/init/, with "media_type": "PHOTO", "post_mode": "DIRECT_POST" and a photo_images array of URLs plus photo_cover_index. The docs only describe pulling photos from a URL.

Step 3: Check the publish status

curl --location 'https://open.tiktokapis.com/v2/post/publish/status/fetch/' \
  --header 'Authorization: Bearer act.example12345Example12345Example' \
  --header 'Content-Type: application/json; charset=UTF-8' \
  --data '{"publish_id": "v_pub_url~v2.123456789"}'

The status reference lists PROCESSING_UPLOAD, PROCESSING_DOWNLOAD, SEND_TO_USER_INBOX (upload flow), PUBLISH_COMPLETE and FAILED. For public posts, the post ID arrives in publicaly_available_post_id (TikTok's spelling) only after moderation, which usually takes under a minute but can take a few hours. The post.publish.publicly_available webhook delivers the same ID if you would rather not poll.

The upload-to-inbox flow

The upload flow uses the same body shape without post_info, because the creator writes the caption in TikTok:

curl --location 'https://open.tiktokapis.com/v2/post/publish/inbox/video/init/' \
  --header 'Authorization: Bearer act.example12345Example12345Example' \
  --header 'Content-Type: application/json; charset=UTF-8' \
  --data '{
    "source_info": {
      "source": "PULL_FROM_URL",
      "video_url": "https://example.verified.domain.com/example_video.mp4"
    }
  }'

The creator gets an inbox notification and finishes the post in the app. The upload reference allows at most 5 pending shares in any 24-hour period, after which you get spam_risk_too_many_pending_share.

The audit and the private-only rule

TikTok's content sharing guidelines set these limits for apps that have not passed the audit:

To make a post public later, the creator has to switch their account to public and then change each post's privacy to Everyone by hand.

Passing the audit lifts the private-only restriction. Even audited apps have a daily active-creator cap based on the usage estimate in the audit application, and every creator has a Direct Post limit of about 15 posts per day shared across all apps. TikTok says test apps, internal-only tools and apps that copy content from other platforms are not acceptable uses, so a personal script that reposts your YouTube Shorts is unlikely to pass.

The UX rules your post screen must follow

The audit checks your interface, not just your API calls. The guidelines require that you:

  1. Show the creator's nickname so they know which account will post.
  2. Stop and explain if creator info says they cannot post right now, and check the video against max_video_post_duration_sec.
  3. Offer privacy as a dropdown filled from privacy_level_options, with nothing preselected.
  4. Show Comment, Duet and Stitch toggles unchecked by default, and grey out any the creator has turned off in TikTok. Photo posts show only Allow Comment.
  5. Include a commercial content disclosure toggle, off by default, with "Your brand" and "Branded content" options. Branded content cannot be private.
  6. Show the consent statement linking to TikTok's Music Usage Confirmation (and the Branded Content Policy when relevant) before the publish button.
  7. Show a preview, let the creator edit any preset caption or hashtags, add no watermarks or promotional text, and upload nothing until the creator has explicitly agreed.
  8. Tell the creator that processing can take a few minutes.

Media requirements

From the media transfer guide:

Video Photo
Formats MP4 (recommended), WebM, MOV WebP, JPEG
Codecs H.264 (recommended), H.265, VP8, VP9
Size Up to 4 GB Up to 20 MB per image
Other 23 to 60 FPS, 360 to 4096 px each side, up to 10 minutes through the API (the creator's own limit may be 3, 5 or 10 minutes) Up to 1080p

For FILE_UPLOAD, chunks must be 5 MB to 64 MB (the last can be up to 128 MB), with 1 to 1,000 chunks uploaded in order. Files under 5 MB go in one piece. For PULL_FROM_URL, the URL must be HTTPS on a verified domain or prefix, must not redirect, and must stay reachable until the download finishes. Downloads time out after one hour.

Rate limits

Endpoint Limit
Direct Post init, upload init 6 requests per minute per user token
Status fetch 30 requests per minute per user token
Direct Post per creator About 15 posts per day, shared across all apps
Upload to inbox 5 pending shares per 24 hours

Error codes and fixes

error.code Meaning Fix
unaudited_client_can_only_post_to_private_accounts Your app is not audited and the account is public Have the creator set their account to private, or pass the audit
privacy_level_option_mismatch Privacy level not in privacy_level_options Re-query creator info and let the creator choose again
url_ownership_unverified video_url is not on a verified domain or prefix Verify the domain, or switch to FILE_UPLOAD
spam_risk_too_many_posts Creator hit the daily post cap Wait until tomorrow or post in the TikTok app
reached_active_user_cap Your app hit its daily active-creator quota Try later; the cap comes from your audit estimate
access_token_invalid Token expired Refresh, or ask the creator to reconnect
scope_not_authorized Creator did not grant the scope Send them through login again
rate_limit_exceeded Too many requests Back off; init allows 6 per minute

Failures after init show up in the status call as fail_reason: file_format_check_failed, duration_check_failed, frame_rate_check_failed, picture_size_check_failed, video_pull_failed, publish_cancelled, auth_removed and several spam_risk values. TikTok marks internal, video_pull_failed and photo_pull_failed as worth retrying, and auth_removed and the spam reasons as not.

What we ran into building this

Taskwind's TikTok connector uses Direct Post with PULL_FROM_URL. Things we learned:

TikTok through Taskwind

TikTok requires the creator to see and confirm every Direct Post, so Taskwind does not let API keys post to TikTok. Unlike the other networks, POST /v1/posts with an API key cannot target a TikTok account.

You post to TikTok from the Taskwind dashboard or through an AI assistant connected to the TikTok MCP server. In both cases Taskwind loads the creator info, the creator picks privacy and the Comment, Duet and Stitch settings, and confirms the post. Video is required, captions go up to 2,200 characters, and posts can be scheduled. Plans start at $49/month with a 7-day trial (pricing). If you need hands-off TikTok publishing from your own backend, build on the Content Posting API directly and plan for the audit. For the same video on YouTube Shorts, see the YouTube upload API guide.

Questions

Can I post to TikTok with the API for free?

Yes. TikTok publishes no fee for the Content Posting API. You need an approved app, and public Direct Posts need the audit.

Can I schedule TikTok posts through the API?

The Content Posting API has no schedule field, so posts go out when you call init. To schedule, store the post and call the API at the chosen time, re-checking creator info first.