- PostFast Home
- /
- API Guides
- /
- TikTok
- /
- videos
How to Schedule TikTok Videos via API
Upload and schedule TikTok videos programmatically using the PostFast API. Control privacy, engagement settings, duets, stitches, and branded content.
TikTok is the leading short-form video platform with over 1 billion monthly active users. Using the PostFast API, you can schedule TikTok videos with full control over privacy settings, engagement features (comments, duets, stitches), and branded content disclosure.
The API supports fully automated posting - no manual intervention required. Upload your video, set your preferred controls, and PostFast handles the rest. Videos are published at your scheduled time with all settings applied.
Key capabilities when scheduling TikTok videos via API include privacy control (public, mutual friends, private), engagement toggles (comments, duets, stitches), branded content disclosure, automatic music addition, and custom cover timestamps for thumbnails.
API Parameters
| Parameter | Type | Description |
|---|---|---|
tiktokPrivacy | string | Controls who can view the video PUBLICMUTUAL_FRIENDSONLY_ME |
tiktokAllowComments | boolean | Allow comments on the video |
tiktokAllowDuet | boolean | Allow other users to create duets with this video |
tiktokAllowStitch | boolean | Allow other users to stitch this video |
tiktokBrandOrganic | boolean | Mark as brand organic content (self-promotional) |
tiktokBrandContent | boolean | Mark as branded content (sponsored/partnership) |
tiktokAutoAddMusic | boolean | Automatically add background music to the video |
Code Example
const response = await fetch('https://api.postfa.st/social-posts', {
method: 'POST',
headers: {
'pf-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"posts": [
{
"content": "3 productivity hacks that changed my morning routine ☀️ Which one are you trying first? #productivity #morningroutine #lifehacks",
"mediaItems": [
{
"key": "video/a7b8c9d1-e2f3-4567-8901-23456789abcd.mp4",
"type": "VIDEO",
"sortOrder": 0,
"coverTimestamp": "3"
}
],
"scheduledAt": "2025-01-31T10:00:00.000Z",
"socialMediaId": "550e8400-e29b-41d4-a716-446655440001"
}
],
"controls": {
"tiktokPrivacy": "PUBLIC",
"tiktokAllowComments": true,
"tiktokAllowDuet": true,
"tiktokAllowStitch": true
}
})
});
const data = await response.json();
Did You Know?
Tips
Use coverTimestamp to set the perfect thumbnail - e.g., "3" for 3 seconds into the video
Videos 15-30 seconds perform best for TikTok's algorithm and engagement
Enable Duet and Stitch to encourage community engagement and boost reach
Mark branded content appropriately (tiktokBrandContent) for FTC/TikTok compliance
Export at 1080p - TikTok downscales 4K videos anyway
Add captions to your video - 73% of TikTok users watch without sound
Hook viewers in the first 3 seconds to reduce scroll-away
Schedule videos, carousels, and drafts to TikTok via API
Common Pitfalls
Without coverTimestamp, TikTok picks a random frame as the thumbnail. Set it explicitly for a professional look.
Landscape (16:9) videos get letterboxed on TikTok. Use vertical 9:16 format for full-screen display.
Failing to set tiktokBrandContent: true on sponsored posts violates TikTok policy and can result in account penalties.
Files over 250 MB will be rejected. Compress your video before upload using H.264 codec at 6-8 Mbps bitrate.
Use MP4 or MOV with H.264 codec. Other formats like WebM or AVI may fail or have quality issues.
tiktokIsDraft: true saves as draft (not published). tiktokPrivacy: "ONLY_ME" publishes but makes it private. They are different!
Frequently Asked Questions
What video formats work with the TikTok API?
MP4 and MOV formats with H.264 video codec and AAC audio codec work best. Keep videos under 250 MB and use 6-8 Mbps bitrate for optimal quality.
How do I set the video thumbnail?
Use the coverTimestamp field in your mediaItem object. Set it to the number of seconds into the video where you want the thumbnail captured (e.g., "3" for 3 seconds).
What's the difference between brand organic and brand content?
tiktokBrandOrganic is for self-promotional content about your own brand. tiktokBrandContent is for sponsored/partnership content where you're paid to promote another brand. Use the appropriate flag for FTC compliance.