TikTok API
The TikTok API for posting, research and results
postpeg publishes videos and photo posts to TikTok through its official API, from the same endpoint that handles nine other networks. Send a video by public https URL, or a carousel’s slides as a photo post, with a caption, and choose who can see it with platform_options.tiktok.privacy.
- Publish
- Schedule
- Analytics
- TikTok62/2200video
Latte art in 30 seconds, from pour to heart. #coffee #latteart
Ready
The example below, checked against TikTok’s rules
TikTok is postpeg’s first network. Beyond posting, postpeg finds the videos breaking out in your niche and breaks down why they worked (see the TikTok posting API and TikTok competitor analysis API pages), then measures your version against the niche.
- TikTok Posting API: Publish and schedule TikTok videos, checked before they’re sent.
- TikTok Competitor Analysis API: Your competitors’ breakout videos, ranked daily, with why they worked.
- Free TikTok hook analyzer: paste one video and see why it worked.
What you can do on TikTok
- Publish. Publish to TikTok now with
POST /v1/posts, alone or in the same request as any of the other networks. More on the Posting API. - Schedule. Schedule up to a year ahead with
scheduled_at, and cancel withDELETE /v1/posts/{id}any time before it goes out. More on the Scheduling API. - Analytics. Read impressions, likes, shares and more per post with
GET /v1/posts/{id}/analytics, and follower growth withGET /v1/accounts/{id}/analytics. More on the Analytics API.
Not available on TikTok: comments and direct messages. The coverage table shows what each network supports.
TikTok’s rules, checked before sending
A TikTok post can have up to 2,200 characters, counted as people see them (an emoji is one). Media is required: up to 35 images or 1 video. postpeg runs these checks on every request, so a post that won’t fit TikTok is refused with a 400 before anything is published, on any network.
| Max text | 2,200 characters |
|---|---|
| Media | Required |
| Images | 35 |
| Videos | 1 |
| Images and video together | None |
| Required options | None |
| Connects with | Hosted OAuth |
Connecting TikTok accounts
Call POST /v1/accounts/connect with a profile and "platform": "tiktok", and send the account’s owner to the URL you get back. It’s valid for 15 minutes. They approve access on TikTok’s own screen and land on your redirect_url with status=success and the new account_id.
The TikTok account’s owner approves access on TikTok’s own screen through the hosted OAuth flow. Your app never sees their password.
If TikTok ever expires a login, the account turns reconnect_required so you can ask its owner to connect again. More in Profiles and accounts.
Example: a scheduled TikTok post
One request, with an Idempotency-Key so a retry on your side never posts twice. To post to TikTok and other networks together, add more ids to account_ids.
curl https://api.postpeg.com/v1/posts \
-H "Authorization: Bearer $POSTPEG_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: tiktok-example-2026-10-01" \
-d '{
"account_ids": [
"acc_mfz22d1q5w8e2r6t0y4u7i3o9s"
],
"content": "Latte art in 30 seconds, from pour to heart. #coffee #latteart",
"media": [
{
"url": "https://example.com/latte-art.mp4",
"type": "video"
}
],
"scheduled_at": "2026-10-01T09:00:00Z",
"platform_options": {
"tiktok": {
"privacy": "public"
}
}
}'{
"id": "post_mfz2k3v8q1w5e9r4t7y0u2i6o3",
"content": "Latte art in 30 seconds, from pour to heart. #coffee #latteart",
"media": [
{
"url": "https://example.com/latte-art.mp4",
"type": "video"
}
],
"platform_options": {
"tiktok": {
"privacy": "public"
}
},
"status": "scheduled",
"scheduled_at": "2026-10-01T09:00:00.000Z",
"targets": [
{
"account_id": "acc_mfz22d1q5w8e2r6t0y4u7i3o9s",
"platform": "tiktok",
"status": "pending",
"platform_post_id": null,
"url": null,
"error": null,
"attempts": 0,
"published_at": null
}
],
"inspired_by": null,
"niche_id": null,
"created_at": "2026-09-24T14:02:11.418Z"
}From 09:00 the target moves through queued and publishing to published with the live url, or to failed with the reason in error. Temporary failures are retried, up to 5 attempts with growing waits. See Publishing for every status.
Questions
- How do I schedule a TikTok post?
- Add
scheduled_at(ISO 8601, up to a year ahead) toPOST /v1/posts. The post waits asscheduledand goes out within a minute of that time.DELETE /v1/posts/{id}cancels it any time before. - What happens if a post breaks TikTok’s rules?
- postpeg checks the text (up to 2,200 characters), the media before anything is sent. A post that doesn’t fit comes back as a
400with every problem listed inissues, and nothing is published on any network. - Which TikTok features does postpeg support?
- Publishing, scheduling, analytics. Comments and direct messages are not available on TikTok; asking for them returns a
400naming the feature. - Can I post photos to TikTok through postpeg?
- Yes, as a photo post of up to 35 JPEG or WebP images, never mixed with a video. TikTok fetches the images from postpeg’s verified media address, so use a carousel’s slides (
POST /v1/tiktok/carousels) or files uploaded to postpeg; images hosted elsewhere fail when the post is sent. - What privacy settings are available for TikTok?
platform_options.tiktok.privacytakespublic,friends,followersorprivate, and defaults topublic. It must be one the creator allows (GET /v1/accounts/{id}/tiktok/creator-info).
Also on the line
The same request publishes to all ten networks. Often paired with TikTok:
Or see all 10: X, Instagram, Facebook, LinkedIn, YouTube, Threads, Pinterest, Bluesky and Google Business, in the platform reference.
Send your first post in a few minutes
The 7-day trial has every feature and 3 connected accounts, with no card. It also posts to Instagram, YouTube, LinkedIn and more through your own Zernio account (its first 2 accounts are free). On TikTok, postpeg also shows what’s working in your niche: TikTok growth.