Skip to content

TikTok API

Postproxy publishes single videos and photo posts (up to 35 images) to a connected TikTok account.

Every request below uses the base URL https://api.postproxy.dev and an Authorization: Bearer YOUR_API_KEY header. Replace YOUR_API_KEY and the example IDs with your own.

Every post targets one or more profiles. A profile is one connected account — for TikTok, a TikTok account. Reference one in a request by its id (the prof_abc123 in the examples below) or by the platform name "tiktok", which selects the group’s TikTok profile (a group holds at most one profile per platform). List what’s connected with GET /api/profiles.

Profiles live in profile groups — containers that organize the accounts for one brand, client, or project. List groups with GET /api/profile_groups, and connect a new TikTok profile with the Initialize Connection endpoint.

Example: get profiles and profile groups

List the profiles you can post to — GET /api/profiles:

Terminal window
curl -X GET "https://api.postproxy.dev/api/profiles" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"id": "prof_abc123",
"name": "@mycompany",
"platform": "tiktok",
"status": "active",
"profile_group_id": "grp_xyz789",
"expires_at": null,
"post_count": 47,
"avatar_url": "https://cdn.postproxy.dev/uploads/avatar_prof_abc123.jpg"
}
]
}

List your profile groups — GET /api/profile_groups:

Terminal window
curl -X GET "https://api.postproxy.dev/api/profile_groups" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{ "id": "grp_xyz789", "name": "Main Brand", "profiles_count": 5 },
{ "id": "grp_def456", "name": "Client Project", "profiles_count": 3 }
]
}
Platform IDtiktok
Formatsvideo (default), image
Character limit2,200
MediaRequired
CommentsNo (can be disabled per post)
Direct messagesNo
Post chainsNo
FormatDescription
videoSingle video (default)
imagePhoto post, up to 35 images
ParameterTypeRequiredDescription
formatstringNo"video" (default)
privacy_statusstringNoSee privacy values; defaults to PUBLIC_TO_EVERYONE
made_with_aibooleanNoMark content as AI-generated
disable_commentbooleanNoDisable comments on the post
disable_duetbooleanNoDisable Duets
disable_stitchbooleanNoDisable Stitches
brand_content_togglebooleanNoPaid partnership promoting a third-party business
brand_organic_togglebooleanNoPaid partnership promoting your own brand
MediaMax sizeFormatsCountDuration
Video4 GBmp4, mov, av, webm13 s – 10 min
  • A video is required. Minimum dimensions: 720×1280 px.
Terminal window
# Video post
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Quick tip: Building APIs just got easier! 🚀" },
"profiles": ["prof_abc123"],
"media": ["https://example.com/video.mp4"],
"platforms": {
"tiktok": {
"privacy_status": "PUBLIC_TO_EVERYONE",
"disable_comment": false,
"made_with_ai": false
}
}
}'
ParameterTypeRequiredDescription
formatstringYes"image"
privacy_statusstringNoSee privacy values; defaults to PUBLIC_TO_EVERYONE
photo_cover_indexintegerNoIndex (0-based) of the cover photo
auto_add_musicbooleanNoAdd music automatically
disable_commentbooleanNoDisable comments on the post
brand_content_togglebooleanNoPaid partnership promoting a third-party business
brand_organic_togglebooleanNoPaid partnership promoting your own brand
MediaMax sizeFormatsCountDuration
Image20 MBjpg, gif35
Terminal window
# Photo post
curl -X POST "https://api.postproxy.dev/api/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"post": { "body": "Swipe through our 2026 lookbook 📸" },
"profiles": ["prof_abc123"],
"media": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg"
],
"platforms": {
"tiktok": {
"format": "image",
"privacy_status": "PUBLIC_TO_EVERYONE",
"photo_cover_index": 0,
"auto_add_music": true
}
}
}'
ValueVisibility
PUBLIC_TO_EVERYONEEveryone
MUTUAL_FOLLOW_FRIENDSMutual followers
FOLLOWER_OF_CREATORFollowers only
SELF_ONLYPrivate (only you)

privacy_status is optional — omit it and the post defaults to PUBLIC_TO_EVERYONE. That default is only accepted for production-audited TikTok apps; unaudited or sandbox apps must send a non-public value (such as SELF_ONLY), or TikTok rejects the post.

The Comments API does not support TikTok. You can, however, disable comments on a post at publish time with disable_comment: true.

Not supported.

Postproxy records periodic stat snapshots you can pull as a timeseries; field names pass through from TikTok unchanged.

Account-level metrics, refreshed roughly every 23 hours via the Profile stats endpoint (GET /api/profiles/:id/stats).

Fields: follower_count, following_count, likes_count, video_count

Terminal window
# Fetch the profile stats timeseries
curl "https://api.postproxy.dev/api/profiles/prof_abc123/stats" \
-H "Authorization: Bearer YOUR_API_KEY"

Per-post engagement, captured after publish via the Post stats endpoint (GET /api/posts/stats). Requires the post to have a public ID.

Fields: impressions, likes, comments, shares

Terminal window
# Fetch post stats
curl "https://api.postproxy.dev/api/posts/stats?post_ids=post_abc123&profiles=tiktok" \
-H "Authorization: Bearer YOUR_API_KEY"

Subscribe with the Webhooks API:

Terminal window
curl -X POST "https://api.postproxy.dev/api/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/postproxy",
"events": ["platform_post.published", "platform_post.failed", "platform_post.insights"]
}'

Events relevant to TikTok:

EventWhen
post.processedA post is ready to publish
platform_post.publishedA post was published to the platform
platform_post.failedA post failed to publish (retries exhausted)
platform_post.failed_waiting_for_retryA publish attempt failed; will retry
platform_post.insightsNew analytics snapshot
profile.connected / .disconnectedConnection state changed
profile.statsNew profile stats snapshot
media.failedA media attachment failed to process
  • privacy_status is optional and defaults to PUBLIC_TO_EVERYONE — see Privacy status for the audited-app caveat.
  • Videos must be at least 720×1280 px.
  • When a post is a paid partnership, set brand_content_toggle (third-party) or brand_organic_toggle (own brand) as required by TikTok.