Skip to main content

TokPortal API for Agencies

Manage TikTok and Instagram campaigns for dozens of clients from a single API key. Create accounts, schedule content, and pull analytics — all programmatically. No manual dashboard work.

How agencies use TokPortal

1. Create accounts for each client

curl -X POST https://app.tokportal.com/api/ext/bundles \
-H "X-API-Key: tok_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "USA",
"title": "Client: Acme Corp - US TikTok",
"videos_quantity": 20
}'

Use the title field to tag bundles by client. You can filter later when listing bundles.

2. Scale across clients and markets

Use Performance Max to create accounts for multiple clients in one call:

curl -X POST https://app.tokportal.com/api/ext/bundles/bulk \
-H "X-API-Key: tok_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"platforms": ["tiktok", "instagram"],
"countries": ["USA", "GBR"],
"accounts_count": 1,
"videos_per_account": 10,
"title": "Client: Acme Corp - Q2 Launch"
}'

4 accounts for one client in one call. Repeat for each client.

3. Build automated reporting

Pull analytics for all accounts and generate client reports:

curl https://app.tokportal.com/api/ext/analytics/{account_id} \
-H "X-API-Key: tok_live_your_key"

Returns:

{
"data": {
"followers": 1250,
"total_views": 145000,
"engagement_rate": 4.2,
"videos": [
{ "position": 1, "views": 28000, "likes": 1200, "comments": 89 }
]
}
}

Loop through all accounts to build a full client dashboard.

4. Integrate with your existing tools

The REST API works with anything:

ToolIntegration
Your CRMTrigger campaigns when a client signs up
Google SheetsImport video schedules from shared sheets
SlackNotify your team when accounts are delivered
Custom dashboardBuild a white-label client portal
n8n / Zapier / MakeNo-code workflow automation

Workflow: onboarding a new client

  1. Create bundles — One per country/platform the client needs
  2. Configure accounts — Username, bio, profile picture per client brand
  3. Upload content — Via API, CSV import, or Google Drive URLs
  4. Publish — Account managers handle the rest
  5. Report — Pull analytics weekly and share with the client

Credit management

All operations use the same credit pool. Track spending per client using bundle titles and the credit history endpoint:

curl https://app.tokportal.com/api/ext/me/credits/history \
-H "X-API-Key: tok_live_your_key"

What's next