TokPortal
Integration

TokPortal REST API: Complete Developer Guide

Everything you need to programmatically create accounts, post videos, add TikTok sounds, and automate organic social distribution at scale.

Vincent Tellenne

Vincent Tellenne

Founder & CEO

March 31, 202612 min read
TokPortal REST API: Complete Developer Guide
Share

The official TikTok Content Posting API lets you upload videos. What it doesn't let you do: add TikTok sounds, use native editing features, post without an API fingerprint, or create new accounts programmatically. If you've hit those walls, you already know why most developers building social media automation pipelines end up duct-taping workarounds together — and why those workarounds eventually break.

The TokPortal API is infrastructure built for what the official API can't do. It gives you full programmatic control over real TikTok and Instagram accounts running on real physical smartphones with local SIM cards in 30+ countries. This guide covers everything: authentication, core endpoints, posting with native sounds, warming, webhooks, and how to wire it all into your existing stack.

Why Developers Choose TokPortal Over the Official TikTok API

Feature

Official TikTok API

TokPortal API

Add TikTok sounds to videos

❌ Not supported
✅ Full sound URL support

Sound volume control

❌ Not available
✅ 0–200% per track

Create new accounts

❌ No
✅ Programmatic account creation

Native in-app posting

❌ API upload only
✅ Posts inside the TikTok app

Location tags

❌ Not supported
✅ Supported

Multi-country distribution

❌ No device targeting
✅ 30+ countries, local SIM + device

Instagram Reels + Stories

❌ Separate API entirely
✅ Unified API

Webhook events

Limited
✅ Full real-time event system

Account warming

❌ Not a concept
✅ Niche + Deep warming via API

The native posting difference

TokPortal posts videos through the actual TikTok and Instagram apps running on physical devices — not through an API upload endpoint. This is why TikTok sounds work, why the algorithm treats posts as genuine user content, and why there's no programmatic fingerprint on your videos. The TokPortal API controls those real devices. That's the architecture.

Getting Started: Authentication and Base Setup

The TokPortal API uses API key authentication passed in the request header. All endpoints are documented at developers.tokportal.com — your primary reference for request schemas, response objects, error codes, and rate limits. Every endpoint, parameter, and example lives there. This guide walks you through the architecture and use cases; the docs site has the technical specifics.

Your API key is tied to your TokPortal workspace. Credits are consumed per action: account creation costs 25 credits, video uploads cost 2 credits each, sound volume adjustments cost 1 credit, and warming options run from 7 credits (niche) to 40 credits (deep, Instagram). You're billed only for what you use, which makes the API well-suited to both high-volume pipelines and experimental automation scripts.

Core Concepts: Bundles, Accounts, and the Device Layer

Before writing a single API call, understand the architecture. TokPortal organizes accounts into bundles — a bundle is a real physical smartphone in a specific country with a local SIM card. When you create a bundle via the API, you're provisioning a device slot. The account (TikTok or Instagram) then lives on that device and inherits all of its trust signals: carrier data, GPS location, cell tower proximity, local WiFi identifiers, and behavioral patterns built up over time.

This matters because TikTok's device fingerprinting is deep. Accounts created on VPNs or cloud servers get shadowbanned within 48 hours because the signal mismatch is obvious to TikTok's systems. A bundle from TokPortal is indistinguishable from a local user because it is a local user — just one you control via API.

30+

Countries with real local devices

< 48h

Time for VPN accounts to get shadowbanned

2 credits

Cost per video upload via API

0–200%

Sound volume control range

25 credits

Cost per new account creation

Real-time

Webhook events for all key actions

The Five API Workflows You'll Actually Use

1

1. Create and Configure an Account (Bundle)

POST to the bundles endpoint to provision a new account in your chosen country. Specify the platform (TikTok or Instagram), target locale, and niche. Once created, use the profile configuration endpoint to set username, bio, and profile picture. Full schema at developers.tokportal.com.

2

2. Run Account Warming

New accounts need warming before posting or they'll underperform. Trigger Niche Warming (7 credits) via the warming endpoint — this runs automated niche-relevant engagement on the account. For Instagram, Deep Warming (40 credits) is available: a 3-day human-managed warming process that builds authentic behavioral history. Pass the bundle ID and warming type in the request body.

3

3. Upload and Schedule a Video

POST your video file or URL to the upload endpoint. Include caption, hashtags, and scheduling timestamp. For TikTok, you can include a sound URL — a capability unique to TokPortal among all social media APIs. The platform downloads the sound and adds it natively inside the TikTok app during posting. Schedule in any timezone using ISO 8601 timestamps.

4

4. Control Sound Volume

After attaching a sound to a video post, use the sound volume endpoint to set independent volume levels for the original video audio (0–200%) and the added TikTok sound (0–200%). This costs 1 credit and lets you precisely balance voiceover, background music, and native sound — from a single API call.

5

5. Monitor via Webhooks and Analytics

Register a webhook URL to receive real-time events: post published, post failed, warming complete, account flagged. The analytics endpoint returns views, likes, comments, shares, and follower changes per post and per account. Use this data to feed your reporting stack or trigger conditional logic in your automation pipeline.

TikTok Sound API: The Feature No Other API Has

This is worth stopping on. The official TikTok API explicitly does not support adding TikTok sounds to uploaded videos. Sounds are one of the most powerful distribution mechanisms on TikTok — trending sounds can 3–5x organic reach for the same video content. Every manual TikTok creator knows this. But every developer building programmatic TikTok distribution has had to accept that sounds just aren't available in the API.

TokPortal's API breaks that constraint. Because posting happens inside the actual TikTok app on a real device, sounds are added exactly the way a human creator would add them. You pass a TikTok sound URL in your video upload request. TokPortal's device layer adds the sound natively during the posting process. The resulting post is identical to one a creator made manually — complete with the sound attribution, the trending sound discovery surface, and all associated algorithmic benefits.

For developers building UGC distribution pipelines, content agencies managing dozens of accounts, or e-commerce brands seeding product videos across multiple markets, this is the differentiator that changes the economics of organic TikTok.

  • Add any TikTok sound by URL to any video post via a single API parameter
  • Independent volume control: set original audio and added sound separately (0–200%)
  • Sounds appear natively — same as a human creator adding them in-app
  • Works across all account types and all supported countries
  • Trending sound support: pair the same video with multiple sounds across different accounts
  • TikTok Carousels (photo mode) support sounds via the same endpoint
  • Sound volume adjustment costs just 1 credit per post

Supported Platforms and Content Types

The TokPortal API handles both TikTok and Instagram through a unified interface. You specify the platform at the bundle level (when creating the account) and again at the upload level (when posting content). Here's what each platform supports:

TikTok: Standard video posts, Carousels (photo mode with sound), captions, hashtags, sounds, location tags, and scheduled posting.

Instagram: Reels, standard feed posts, carousels (swipeable multi-image), fixed photos, and Stories. Instagram posts additionally support location tags, collaborator tags, audio, link in bio updates, and add-to-story triggers. Deep Warming is also exclusive to Instagram accounts.

All content types support scheduling. All post types are submitted through the native app, not through Meta or TikTok's official upload APIs — which is what preserves native features, reach, and algorithm treatment.

Integrating TokPortal Into Your Automation Stack

Most developers don't use the TokPortal API in isolation. It slots into existing content pipelines, distribution workflows, and marketing automation stacks. Here's how the integrations break down by use case:

Visual workflow builders: If your team uses n8n, you can wire TokPortal API calls directly into automated workflows — trigger posting from a CMS publish event, a Google Sheets row, or a webhook from your product. Make.com works the same way for scenario-based automation. Zapier connects TokPortal to 5,000+ apps if you need lighter-touch no-code integration.

AI agent integration: TokPortal has an MCP (Model Context Protocol) server that lets AI agents — Claude, ChatGPT, or custom agents — autonomously create accounts, schedule videos, and manage campaigns. If you're building an AI-powered content distribution system, the MCP server integration is the fastest path to agent-controlled social distribution.

CRM and data tools: TokPortal webhooks pipe events directly into Airtable, HubSpot, or Salesforce. Use post-published events to trigger CRM workflows, update campaign tracking records, or fire attribution events in your analytics stack.

Building an AI-powered distribution pipeline?

The TokPortal MCP server lets AI agents autonomously manage TikTok and Instagram campaigns — creating accounts, uploading videos, adjusting sounds, and responding to performance data without human intervention. It's the only social media infrastructure with native MCP support. See the full integration guide at /integrations/mcp-ai-agents.

Webhooks: Building Event-Driven Social Pipelines

Polling the analytics endpoint every few minutes is inefficient. TokPortal's webhook system lets you register an endpoint and receive push notifications for every meaningful state change. This is the right architecture for production pipelines.

Key webhook events include: post.published (video went live on TikTok or Instagram), post.failed (post attempt failed with reason), warming.complete (account warming finished), account.flagged (account needs attention), and analytics.updated (new performance data available). Each event payload includes the bundle ID, account details, timestamp, and event-specific metadata.

In practice, this means you can build a pipeline where: a video is approved in your CMS → your system POSTs to TokPortal's upload endpoint → TokPortal posts the video natively → a post.published webhook fires → your analytics dashboard updates automatically → your CRM logs the distribution event. Zero polling, zero manual checking.

Full webhook payload schemas and signature verification instructions are at developers.tokportal.com.

Multi-Country Distribution: How to Think About It Programmatically

One of the strongest use cases for the TokPortal API is distributing the same video content across multiple countries simultaneously. Here's the logic: TikTok's algorithm is regional. A video posted from a US account reaches a US audience. The same video posted from a German account with German hashtags reaches a German audience. If you want multi-market organic reach, you need accounts in each market — and those accounts need to look local, not like a VPN cluster.

Via the API, you create bundles specifying the target country at provisioning time. A typical multi-market distribution script: create one bundle per target country → warm each account → build a posting loop that uploads the same video (with localized captions and hashtags) to each bundle on a stagger → collect analytics per bundle to compare regional performance.

The API supports 30+ countries including USA, UK, France, Germany, Canada, Australia, Brazil, Indonesia, Philippines, Malaysia, and more. Country availability is returned from the /countries endpoint so you can query it programmatically before provisioning.

Start Building Your First Programmatic Distribution Pipeline

The TokPortal API docs have everything you need: endpoint reference, authentication guide, webhook schemas, and code examples. Create your workspace, get your API key, and post your first video with a native TikTok sound — programmatically.

Read the Full API Docs at developers.tokportal.com

Credit Cost Reference for API Operations

When building a pipeline, you need to model costs accurately. Here's the full credit breakdown for API-triggered operations:

25 credits

Account (bundle) creation

2 credits

Per video upload / post

7 credits

Niche warming (TikTok + Instagram)

40 credits

Deep warming (Instagram only)

3 credits

Video editing operations

1 credit

Sound volume adjustment

Common Architecture Patterns

Best-fit use cases for the TokPortal API

  • High-volume content distribution (50+ posts/day across accounts)
  • Multi-country simultaneous campaigns triggered from a CMS
  • AI agent-managed social media with autonomous decision-making
  • Custom analytics pipelines feeding into BI tools
  • Conditional posting logic (post when X performance threshold is hit)
  • Automated account provisioning for agency client onboarding
  • Integration with existing marketing automation tools (n8n, Make, Zapier)
  • Dynamic caption/hashtag generation paired with LLM APIs

Use cases better served by the dashboard UI

  • One-off account setup where manual configuration is faster
  • Small teams posting fewer than 5 videos/week per account
  • Non-technical marketers who prefer click-and-go workflows
  • Campaigns requiring heavy creative review before each post

The only API I've found that actually lets you add TikTok sounds programmatically. Every other solution either doesn't support sounds or routes around the TikTok app in a way that tanks reach. TokPortal posts inside the app — you can tell from the analytics.

Technical marketer building a UGC distribution pipeline

Where is the full API reference documentation?+
Everything lives at developers.tokportal.com — endpoint reference, authentication setup, request/response schemas, webhook payloads, error codes, and rate limits. That's your primary technical resource. This guide covers architecture and use cases; the docs site has the specifics you need to write production code.
Can I really add TikTok sounds via the API? How does that work technically?+
Yes. When you submit a video upload request, you include a TikTok sound URL as a parameter. TokPortal's device layer opens the TikTok app on the real physical device, adds the sound natively during the post creation flow — exactly the way a human creator would — and then publishes the video. The sound appears on the post with full attribution and all algorithmic benefits. This is only possible because TokPortal posts inside the app, not through TikTok's official upload API.
How do I handle authentication for the API?+
The TokPortal API uses API key authentication in the request header. Your key is tied to your workspace and can be generated from your account settings. Full authentication documentation including header format and key rotation is at developers.tokportal.com.
What happens if a post fails? How do I handle errors in my pipeline?+
Failed posts trigger a post.failed webhook event with a reason code and description. Common reasons include account requiring re-warming, content flagged pre-post, or scheduling conflicts. Your pipeline should handle this event by logging the failure, optionally retrying, and alerting if failure rates exceed a threshold. All error codes and their meanings are documented at developers.tokportal.com.
Can I use the API to manage accounts at scale for an agency with many clients?+
Yes, this is one of the primary use cases. You can create and manage separate bundle pools per client, use webhook events to feed per-client reporting, and automate the full account lifecycle — creation, warming, posting, and analytics — through the API. Many agencies also integrate TokPortal with n8n or Make.com to build visual workflows their ops teams can manage without touching code directly.
Is there an MCP server for AI agent integration?+
Yes. TokPortal has an MCP (Model Context Protocol) server that lets AI agents like Claude or custom LLM-powered systems autonomously create accounts, upload videos, manage campaigns, and respond to analytics data. It's documented at /integrations/mcp-ai-agents and is the recommended architecture if you're building AI-driven social media automation.
Do accounts created via the API behave the same as those created through the dashboard?+
Identical. Whether you create a bundle through the dashboard or the API, you get the same real physical device with a local SIM card in your chosen country. The underlying infrastructure is the same — the API just gives you programmatic control over it. Account trust signals, reach, and algorithm treatment are indistinguishable from manually-managed accounts.
Share
Vincent Tellenne

Written by

Vincent Tellenne

Founder & CEO

Vincent is the founder of TokPortal, building the infrastructure for scaled organic social media distribution. Previously scaled multiple startups and APIs to millions of requests.

Learn more about this topic with AI

Ready to launch?Start with TokPortal