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. 1.
    Get API Key
    Sign up for free and get your API key in seconds.
  2. 2.
    Connect Account
    Use our OAuth flow to connect TikTok Ads accounts.
  3. 3.
    Start Posting
    Make API calls to post content to TikTok Ads.
Create a Standalone TikTok Campaign
JavaScript
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

POST/v1/ads/create

Create a TikTok Campaign → Ad Group → Ad hierarchy

POST/v1/ads/boost

Create a Spark Ad from an existing organic TikTok post

POST/v1/ads/audiences

Create a Custom Audience (customer list or lookalike)

GET/v1/ads/{id}

Get ad status, spend, and creative details

PUT/v1/ads/{id}

Update budget, status, or schedule

GET/v1/ads/{id}/analytics

Spend, impressions, video views, completion rate, CTR, CPC, CPM

GET/v1/ads/campaigns

List campaigns across connected TikTok ad accounts

Media Requirements

TypeFormatMax SizeNotes
VideoMP4, MOV, MPEG500 MB9:16 vertical recommended, 720p+, 5-60 sec
ImageJPEG, PNG30 MB1080x1920 recommended for full-screen
HeadlineText100 charsAd description / call-to-action text
Spark Ad sourceOrganic TikTok postN/AConnected 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

Create a Spark Ad
cURL
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

SOC 2 CompliantGDPR Compliant