Platform GuidesHow to Schedule TikTok Posts via API

How to Schedule TikTok Posts via API

Schedule TikTok posts programmatically with the SocialRails API. Covers video requirements, caption limits, privacy settings, commercial content, and code examples for automated TikTok posting.

Schedule TikTok posts programmatically using the SocialRails API. This guide covers video requirements, caption limits, privacy settings, commercial content disclosure, code examples, and best practices for automated TikTok posting.

Character Limits

  • Captions: 2,200 characters
  • Titles: 150 characters
  • Hashtags: Included in the caption character count
  • Mentions: Included in the caption character count

Supported Content Types

TypeSupportedNotes
VideosYesRequired, 3 seconds to 10 minutes
ImagesYesAs photo slideshows (carousel format)
Text onlyNoMedia is required for all TikTok posts
CarouselsYes2-35 images as a photo slideshow

API Example

# Upload video first
curl -X POST https://socialrails.com/api/v1/media/upload \
  -H "Authorization: Bearer sr_live_YOUR_KEY" \
  -F "file=@my-video.mp4"
 
# Then schedule the TikTok post
curl -X POST https://socialrails.com/api/v1/posts \
  -H "Authorization: Bearer sr_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Check out this tutorial! #coding #api #socialrails",
    "platform": "tiktok",
    "media": ["MEDIA_KEY_FROM_UPLOAD"],
    "scheduled_for": "2026-03-15T19:00:00Z",
    "platform_settings": {
      "tiktok": {
        "privacy_status": "PUBLIC_TO_EVERYONE",
        "allow_comment": true,
        "allow_duet": true,
        "allow_stitch": true,
        "post_mode": "DIRECT_POST"
      }
    }
  }'

TikTok Settings

TikTok offers several platform-specific settings to control how your post appears and who can interact with it.

Privacy Status

Control who can view your TikTok post:

  • PUBLIC_TO_EVERYONE: Visible to all TikTok users (default)
  • MUTUAL_FOLLOW_FRIENDS: Only visible to mutual followers
  • FOLLOWER_OF_CREATOR: Only visible to your followers
  • SELF_ONLY: Only visible to you (useful for testing)

Interactions

Control how users can interact with your post:

  • allow_comment: Allow comments on the post (default: true)
  • allow_duet: Allow other users to create duets with your video (default: true)
  • allow_stitch: Allow other users to stitch your video (default: true)

Commercial Content

Disclose branded or commercial content to comply with TikTok policies:

  • commercial_content.enabled: Set to true to flag as commercial content
  • commercial_content.your_brand: Set to true if promoting your own brand
  • commercial_content.branded_content: Set to true if promoting a third-party brand

Post Mode

  • DIRECT_POST: Publish the video directly to TikTok
  • UPLOAD_TO_INBOX: Send the video to the creator's inbox for manual review before posting

Title

  • title: Optional title for the post, up to 150 characters

Best Practices

  • First 3 seconds: Hook viewers immediately, the first 3 seconds determine whether users keep watching
  • Trending sounds: Use trending audio to boost discoverability via the algorithm
  • Optimal posting times: 7-9pm in your audience's timezone for maximum engagement
  • Video length: 15-60 second videos perform best for engagement and completion rates
  • Hashtags: Use 3-5 relevant hashtags, mix trending and niche tags
  • Post consistently, TikTok's algorithm rewards regular creators

Rate Limits

TikTok Content Posting API limits vary by app status:

  • Rate limits depend on your TikTok developer app approval level
  • Sandbox apps have lower posting limits
  • Production apps receive higher quotas after review

SocialRails handles these limits automatically and will retry failed posts.

Frequently Asked Questions

What is the character limit for TikTok captions?
TikTok captions can be up to 2,200 characters, and titles can be up to 150 characters. Hashtags and mentions count toward the caption character limit, so plan your content accordingly.
What are the video requirements for TikTok API posts?
TikTok requires video content for all posts. Videos must be between 3 seconds and 10 minutes long. You can also post photo slideshows (carousels) with 2-35 images. Upload media first via the /api/v1/media/upload endpoint, then include the media keys when creating your post.
How do I control privacy settings for TikTok posts via API?
Use the privacy_status field in platform_settings.tiktok. Options are PUBLIC_TO_EVERYONE (visible to all), MUTUAL_FOLLOW_FRIENDS (mutual followers only), FOLLOWER_OF_CREATOR (your followers only), and SELF_ONLY (only you). The default is PUBLIC_TO_EVERYONE.
How do I disclose commercial content on TikTok via API?
Use the commercial_content object in platform_settings.tiktok. Set enabled to true, then specify your_brand (true if promoting your own brand) or branded_content (true if promoting a third-party brand). This ensures compliance with TikTok's commercial content policies.