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
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 followersFOLLOWER_OF_CREATOR: Only visible to your followersSELF_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 totrueto flag as commercial contentcommercial_content.your_brand: Set totrueif promoting your own brandcommercial_content.branded_content: Set totrueif promoting a third-party brand
Post Mode
DIRECT_POST: Publish the video directly to TikTokUPLOAD_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.