API Reference
TikTok Ads API
TikTok's Marketing API requires Business Center onboarding and a long-lived developer token. Zernio wraps it in REST - POST a videoUrl and we download and upload the video to TikTok for you.
Quick Start
- 1.Get API KeySign up for free and get your API key in seconds.
- 2.Connect AccountUse our OAuth flow to connect TikTok Ads accounts.
- 3.Start PostingMake API calls to post content to TikTok Ads.
const response = await fetch('https://zernio.com/api/v1/ads/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
platform: 'tiktokads',
accountId: 'acc_tiktokads_123',
adAccountId: '7123456789012345678',
name: 'Spring launch',
goal: 'conversions',
budget: { amount: 100, type: 'daily' },
schedule: { startDate: '2026-04-20' },
creative: {
videoUrl: 'https://cdn.example.com/launch.mp4',
headline: 'Spring drop is live',
callToAction: 'SHOP_NOW',
landingPageUrl: 'https://example.com/spring'
},
targeting: {
age_groups: ['AGE_18_24', 'AGE_25_34'],
locations: [{ id: '6252001', name: 'United States' }]
}
})
});TikTok Ads Endpoints
Create a TikTok Campaign → Ad Group → Ad hierarchy
Create a Spark Ad from an existing organic TikTok post
Create a Custom Audience (customer list or lookalike)
Get ad status, spend, and creative details
Update budget, status, or schedule
Spend, impressions, video views, completion rate, CTR, CPC, CPM
List campaigns across connected TikTok ad accounts
Media Requirements
| Type | Format | Max Size | Notes |
|---|---|---|---|
| Video | MP4, MOV, MPEG | 500 MB | 9:16 vertical recommended, 720p+, 5-60 sec |
| Image | JPEG, PNG | 30 MB | 1080x1920 recommended for full-screen |
| Headline | Text | 100 chars | Ad description / call-to-action text |
| Spark Ad source | Organic TikTok post | N/A | Connected Business account, public post |
Zernio automatically transcodes and optimizes media for TikTok Ads's requirements.
API Limits
TikTok Marketing API enforces per-advertiser and per-app rate limits. Zernio pools across customers and handles 429 responses with exponential backoff.
Zernio handles all rate limiting automatically. We queue and retry requests as needed.
Features
- ✓Campaigns, Ad Groups, Ads (full hierarchy)
- ✓Spark Ads from organic TikTok posts
- ✓Custom Audiences + Lookalikes
- ✓Age, gender, location, and interest targeting
- ✓Video creative from URL - we handle the upload
- ✓Real-time spend and video-view metrics
- ✓No separate developer portal approval
Response Example
curl -X POST "https://zernio.com/api/v1/ads/boost" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"postId": "POST_ID",
"accountId": "ACCOUNT_ID",
"adAccountId": "7123456789012345678",
"platform": "tiktokads",
"name": "Boost viral video",
"goal": "engagement",
"budget": { "amount": 50, "type": "daily" },
"schedule": { "startDate": "2026-04-20", "endDate": "2026-04-27" }
}'Start building with TikTok Ads API
Free tier available · No credit card required · 99.97% uptime

