# 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.

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

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.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
const { data: paused } = await zernio.adcampaigns.updateAdCampaignStatus({
  path: { campaignId: '1802345678901234003' },
  body: { status: 'paused', platform: 'tiktok' }
});
```
</Tab>
<Tab value="Python">
```python
paused = client.ad_campaigns.update_ad_campaign_status(
    campaign_id="1802345678901234003",
    status="paused",
    platform="tiktok",
)
```
</Tab>
<Tab value="curl">
```bash
curl -X PUT "https://zernio.com/api/v1/ads/campaigns/1802345678901234003/status" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "paused", "platform": "tiktok" }'
```
</Tab>
</Tabs>

Response (`200`):

```json
{ "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.

```json
{
  "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.

For an ad group of an Upgraded Smart+ campaign, also send `smartPlus: true` ([Add a video to a Smart+ ad group](/platforms/tiktok-ads/create-ads#add-a-video-to-a-smart-ad-group)). Without it the request returns `422`.

## 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 |

```bash
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`):

```json
{
  "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](/platforms/tiktok-ads/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`](/ad-campaigns/get-ad-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. A connection with an advertiser selection ([Connect](/platforms/tiktok-ads#connect)) holds only the selected ones; `live=true` lists the rest with `selected: false`.

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](/platforms/tiktok-ads#connect) TikTok Ads. |

## Related

- [Pause or resume a campaign](/ad-campaigns/update-ad-campaign-status): every field of the status call.
- [Update ad](/ad-campaigns/update-ad): creative, targeting, status and budget edits.
- [Duplicate ad campaign](/ad-campaigns/duplicate-ad-campaign): the copy call.
- [Ad comments](/platforms/tiktok-ads/ad-comments): read and moderate an ad's comments.