Publish a video to TikTok
1# 1. Upload media
2curl -X POST https://api.social-api.ai/v1/media/upload \
3 -H "Authorization: Bearer <your-api-key>" \
4 -F "file=@video.mp4"
5
6# 2. Create the post
7curl -X POST https://api.social-api.ai/v1/posts \
8 -H "Authorization: Bearer <your-api-key>" \
9 -H "Content-Type: application/json" \
10 -d '{
11 "account_id": "<account-id>",
12 "platforms": ["tiktok"],
13 "text": "Check out this tutorial! #coding #devlife",
14 "media_ids": ["<media-id>"],
15 "platform_options": {
16 "tiktok": {
17 "disclosure": { "branded_content": false, "paid_partnership": false }
18 }
19 }
20 }' | jq
Create a post with a video upload, caption, and required disclosure settings. SocialAPI.ai handles TikTok's chunked upload flow and status polling.