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:
| Tool | Integration |
|---|---|
| Your CRM | Trigger campaigns when a client signs up |
| Google Sheets | Import video schedules from shared sheets |
| Slack | Notify your team when accounts are delivered |
| Custom dashboard | Build a white-label client portal |
| n8n / Zapier / Make | No-code workflow automation |
Workflow: onboarding a new client
- Create bundles — One per country/platform the client needs
- Configure accounts — Username, bio, profile picture per client brand
- Upload content — Via API, CSV import, or Google Drive URLs
- Publish — Account managers handle the rest
- 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
- Bulk Creation — Performance Max for scale
- CSV Import — Import content from spreadsheets
- Analytics — Automated performance tracking
- MCP Server — Manage campaigns from AI tools