TokPortal + Zapier - Social Campaigns via Webhooks
Use Webhooks by Zapier to call TokPortal REST endpoints for bundle creation, account setup, video configuration, and publishing.
TokPortal + Zapier
TokPortal does not currently provide a native Zapier app. Use Webhooks by Zapier with the public REST API.
The API can create bundles, configure account profiles, configure videos from public URLs, publish bundles, and read status/analytics. Zapier handles the trigger and data mapping; TokPortal handles the order lifecycle after publish.
Authentication
Add these headers to every Webhooks action:
| Header | Value |
|---|---|
X-API-Key | sk_your_key_here |
Content-Type | application/json |
Do not use Authorization: Bearer for TokPortal API keys.
Example Zap: Google Sheets to TikTok bundle
Sheet columns:
country,username,visible_name,biography,profile_picture_url,video_url,description,target_publish_date
1. Trigger
Use Google Sheets > New Spreadsheet Row or any equivalent app trigger.
2. Create bundle
Action: Webhooks by Zapier > Custom Request
Method: POST
URL: https://app.tokportal.com/api/ext/bundles
Headers:
X-API-Key: sk_your_key_here
Content-Type: application/json
Body:
{
"bundle_type": "account_and_videos",
"platform": "tiktok",
"country": "{{country}}",
"videos_quantity": 1,
"external_ref": "zapier-{{zap_meta_human_now}}"
}
Zapier should map data.bundle_id from the response into later actions.
Reference: Create Bundle
3. Configure account
Method: PUT
URL: https://app.tokportal.com/api/ext/bundles/{{data.bundle_id}}/account
Headers:
X-API-Key: sk_your_key_here
Content-Type: application/json
Body:
{
"username": "{{username}}",
"visible_name": "{{visible_name}}",
"biography": "{{biography}}",
"profile_picture_url": "{{profile_picture_url}}"
}
Reference: Account Configuration
4. Configure video
Method: PUT
URL: https://app.tokportal.com/api/ext/bundles/{{data.bundle_id}}/videos/1
Headers:
X-API-Key: sk_your_key_here
Content-Type: application/json
Body:
{
"video_type": "video",
"description": "{{description}}",
"target_publish_date": "{{target_publish_date}}",
"video_url": "{{video_url}}"
}
video_url can be a public/direct URL or a public_url returned by Media Upload. If your Zap receives a large binary file, use a public URL or presigned upload flow instead of sending the file through Zapier.
Reference: Configure Videos
5. Publish
Method: POST
URL: https://app.tokportal.com/api/ext/bundles/{{data.bundle_id}}/publish
Headers:
X-API-Key: sk_your_key_here
Reference: Publish & Unpublish
Useful Zap patterns
| Trigger App | Pattern |
|---|---|
| Airtable | New approved content brief creates a bundle |
| Dropbox | New shared video URL configures a video slot |
| Shopify | New product launch creates a content workflow |
| Slack | Slash command triggers a prefilled bundle |
| Webhooks | Your CMS posts campaign payloads into Zapier |
Monitoring
For reliable production workflows, add one of these:
- Poll
GET /bundles/{id}until the status changes. - Use TokPortal webhooks to send lifecycle events to a Zapier Catch Hook.
- Pull Analytics only after the delivered account has live posts.
Related guides: n8n, Make, Python Quickstart.