Manage ads
Pause or resume TikTok campaigns and ads, read an ad live, add ads to an existing ad group, swap creatives, duplicate campaigns and list agency Business Centers.
Change TikTok ads that already exist: switch delivery on and off, add creatives to an ad group, swap a creative, copy a campaign, and reach every advertiser of an agency.
Pause or resume
PUT /v1/ads/campaigns/{campaignId}/status switches one campaign's own on/off switch. Its ad groups and ads keep their own switches.
const { data: paused } = await zernio.adcampaigns.updateAdCampaignStatus({
path: { campaignId: '1802345678901234003' },
body: { status: 'paused', platform: 'tiktok' }
});Response (200):
{ "status": "paused", "platformCampaignStatus": "DISABLE", "statusReadAt": "2027-01-11T08:55:34.565Z", "updated": 1, "skipped": 0 }platformCampaignStatus is TikTok's own switch (ENABLE or DISABLE), read back after the write. When the live read shows the campaign already in the requested state, nothing is written and the response says updated: 0, skipped: 1.
Resuming a campaign lets each ad group and ad deliver again only if its own switch is on. Switch those with PUT /v1/ads/ad-sets/{adSetId}/status or PUT /v1/ads/{adId}/status, which take the same body.
Read an ad live
GET /v1/ads/{adId}?live=true reads the ad from TikTok now instead of returning what Zernio stored.
Besides the switches, it returns the creative TikTok holds: creative.body (ad text), creative.callToAction, creative.linkUrl (landing page), creative.videoId, creative.adFormat, creative.identityId, creative.identityType, creative.identityAuthorizedBcId, and creative.tiktokItemId on a Spark ad.
{
"ad": {
"platform": "tiktok",
"configuredStatus": "PAUSED",
"creative": {
"body": "Book a visit today",
"callToAction": "LEARN_MORE",
"linkUrl": "https://example.com/visit",
"videoId": "v10033g50000d0abc",
"adFormat": "SINGLE_VIDEO",
"identityId": "7330000000000000001",
"identityType": "BC_AUTH_TT"
}
},
"statusReadAt": "2027-01-11T08:55:34.565Z"
}The creative comes from the same TikTok call as the switches, so it costs no extra request. It is never stored: a later read without live=true returns the stored creative.
statusReadAt: null means TikTok could not be read and the stored values came back. A field TikTok leaves empty keeps its stored value.
The ad group's placement, budget and targeting are in nativeSettings on GET /v1/ads/ad-sets?live=true.
Attach to an existing ad group
POST /v1/ads/create with adSetId creates a new ad inside an existing TikTok ad group. It skips the campaign and ad-group create.
Bid strategy, budget, targeting and goal are inherited from the ad group.
Use it when one ad group was configured by hand in TikTok Ads Manager and you want to add Zernio-managed creatives to it.
Creative swap
PUT /v1/ads/{adId} accepts a creative object that replaces the live creative on an existing TikTok ad. It is patch-style: only the fields you supply are touched.
| Field | On TikTok |
|---|---|
headline | Ignored (no slot on TikTok) |
body | Becomes ad_text |
linkUrl | Becomes landing_page_url |
videoUrl | Triggers a fresh upload |
curl -X PUT "https://zernio.com/api/v1/ads/66f0a1b2c3d4e5f6a7b8c9d0" \
-H "Authorization: Bearer $ZERNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "creative": { "body": "Spring drop, last week", "videoUrl": "https://cdn.example.com/launch-v2.mp4" } }'Response (200):
{
"ad": { "_id": "66f0a1b2c3d4e5f6a7b8c9d0", "platform": "tiktok", "status": "pending_review", "creative": { "body": "Spring drop, last week" } },
"message": "Ad updated"
}The same call takes targeting (Change targeting after creation), status, budget and name.
Campaign duplication
POST /v1/ads/campaigns/{campaignId}/duplicate with platform: "tiktok" works through a manual graph walk.
Zernio reads the source campaign, ad groups and ads. It then recreates each entity with bid configuration, targeting, schedule and creative fields preserved.
Spark Ad linkage (tiktok_item_id) carries over.
Everything is created paused, so you can review before launching. The response carries copiedCampaignId.
The copy reaches GET /v1/ads/tree through a sync that runs after the response, usually within a few minutes. Until then, calls that take a copied id answer 404.
Agency Business Centers
Connecting a TikTok account that owns one or more Business Centers enumerates every advertiser under those BCs.
There is no per-call cap. GET /v1/ads/accounts walks /v2/bc/asset/get/ (paginated server-side), chunks the /v2/advertiser/info/ lookup underneath, and returns the full roster.
Solo advertisers without a BC fall back to the OAuth-time advertiser list. A single token can typically reach a handful of advertisers without a BC.
The advertiser list is cached on the connection for 1 hour, and refreshed on the next call after expiry.
GET /v1/ads/business-centers?accountId= lists the BCs themselves, with an advertiserCount each, for agency-style pickers.
If it fails
| Error | Cause | Fix |
|---|---|---|
400 | Invalid input, or the campaign spans several ad accounts | Check status and platform, and switch the campaign per ad account. |
403 with code ads_allowance_exceeded | The team has no payment method on file and has reached 500 live ads | Add a card to resume. |
404 | No ads found for this campaign | Sync the ad account, or check the campaign id. |
422 with code ads_connection_required | No tiktokads account for the profile | Connect TikTok Ads. |
Related
- Pause or resume a campaign: every field of the status call.
- Update ad: creative, targeting, status and budget edits.
- Duplicate ad campaign: the copy call.
- Ad comments: read and moderate an ad's comments.