> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Spark Ads

Boost a TikTok video as a Spark Ad with POST /v1/ads/boost, including another creator's video through a Spark Code.

Boost a published TikTok video as a Spark Ad with `POST /v1/ads/boost`. Spark Ads keep the creator's identity, organic engagement signals and follower handle.

## Before you start

Use the `accountId` of the TikTok posting account linked when you [connected TikTok Ads](/platforms/tiktok-ads#connect).

A `tiktokads` connection with no posting account can boost too, but only with a Spark Code and `platformPostId` ([Boost another creator's video](#boost-another-creators-video)).

## Promote a post

Call `POST /v1/ads/boost` with `postId`, `accountId`, `adAccountId`, `goal` and `budget`.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
const { data: boosted } = await zernio.adcampaigns.boostPost({
  body: {
    postId: '65f1c0a9e2b5af0012ab34cd',
    accountId: '66b2e19d8c3f5a7e9d0b1c2d',
    adAccountId: '7123456789012345678',
    name: 'Boost viral video',
    goal: 'traffic',
    budget: { amount: 50, type: 'daily' },
    schedule: { startDate: '2027-01-04T09:00:00Z', endDate: '2027-01-11T23:59:00Z' },
    targeting: { countries: ['US'] },
    linkUrl: 'https://example.com/landing',
    callToAction: 'SHOP_NOW',
    bidStrategy: 'COST_CAP',
    bidAmount: 0.5
  }
});

console.log(boosted.ad._id);
```
</Tab>
<Tab value="Python">
```python
boosted = client.ad_campaigns.boost_post(
    post_id="65f1c0a9e2b5af0012ab34cd",
    account_id="66b2e19d8c3f5a7e9d0b1c2d",
    ad_account_id="7123456789012345678",
    name="Boost viral video",
    goal="traffic",
    budget={"amount": 50, "type": "daily"},
    schedule={"startDate": "2027-01-04T09:00:00Z", "endDate": "2027-01-11T23:59:00Z"},
    targeting={"countries": ["US"]},
    link_url="https://example.com/landing",
    call_to_action="SHOP_NOW",
    bid_strategy="COST_CAP",
    bid_amount=0.5,
)

print(boosted["ad"]["_id"])
```
</Tab>
<Tab value="curl">
```bash
curl -X POST "https://zernio.com/api/v1/ads/boost" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postId": "65f1c0a9e2b5af0012ab34cd",
    "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
    "adAccountId": "7123456789012345678",
    "name": "Boost viral video",
    "goal": "traffic",
    "budget": { "amount": 50, "type": "daily" },
    "schedule": { "startDate": "2027-01-04T09:00:00Z", "endDate": "2027-01-11T23:59:00Z" },
    "targeting": { "countries": ["US"] },
    "linkUrl": "https://example.com/landing",
    "callToAction": "SHOP_NOW",
    "bidStrategy": "COST_CAP",
    "bidAmount": 0.5
  }'
```
</Tab>
</Tabs>

Response (`201`):

```json
{
  "ad": {
    "_id": "66f0a1b2c3d4e5f6a7b8c9d0",
    "name": "Boost viral video",
    "platform": "tiktok",
    "status": "pending_review",
    "adType": "boost",
    "goal": "traffic",
    "budget": { "amount": 50, "type": "daily" },
    "bidStrategy": "COST_CAP",
    "bidAmount": 0.5,
    "platformAdId": "1802345678901234567",
    "platformCampaignId": "1802345678901234001",
    "platformAdSetId": "1802345678901234002"
  },
  "message": "Ad created and submitted for review"
}
```

`linkUrl` and `callToAction` are the Spark Ad creative overrides. They map to `landing_page_url` and `call_to_action` on the TikTok ad.

Pass them for traffic and conversion goals. Without `linkUrl`, the Spark Ad has no clickable destination distinct from the organic video.

TikTok boosts need at least one of `countries`, `regions`, `cities`, `metros` or `zips` in `targeting`. The exception is attaching to an existing Smart+ ad group with `adSetId`.

`bidStrategy` and `bidAmount` are optional Cost Cap bidding ([Bid strategy](/platforms/tiktok-ads/create-ads#bid-strategy)).

## Boost another creator's video

To boost a creator's organic video from a different TikTok account than the one running the ads, you need a Spark Code.

The creator generates it in their TikTok app's Promote settings and shares it with the advertiser.

Pass it as `sparkAuthCode` on `POST /v1/ads/boost`, with the creator's video as `platformPostId`:

```json
{
  "platformPostId": "7310234567890123456",
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "adAccountId": "7123456789012345678",
  "name": "Cross-creator boost",
  "goal": "traffic",
  "budget": { "amount": 50, "type": "daily" },
  "targeting": { "countries": ["US"] },
  "linkUrl": "https://example.com",
  "callToAction": "SHOP_NOW",
  "sparkAuthCode": "BCAQAAAA..."
}
```

Without `sparkAuthCode`, boosts are limited to videos owned by the same TikTok account that runs the ads.

The value maps to `auth_code` on TikTok's `AdcreateCreatives`.

**On a `tiktokads` connection** with no posting account, `accountId` takes the TikTok Ads connection. It has no TikTok identity, so `sparkAuthCode` is required.

Send the video's TikTok item id as `platformPostId`. A Zernio `postId` is a 400 there.

## Run a housing, employment or credit ad

TikTok requires a special ad category on housing, employment and credit ads aimed at the US or Canada. Send `specialAdCategories` with `HOUSING`, `EMPLOYMENT` or `CREDIT`, the same field Meta takes.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
const { data: boosted } = await zernio.adcampaigns.boostPost({
  body: {
    postId: '65f1c0a9e2b5af0012ab34cd',
    accountId: '66b2e19d8c3f5a7e9d0b1c2d',
    adAccountId: '7123456789012345678',
    name: 'Listing tour, 12 Oak Street',
    goal: 'traffic',
    budget: { amount: 50, type: 'daily' },
    targeting: { countries: ['US'], ageMin: 25 },
    linkUrl: 'https://example.com/listings/12-oak-street',
    callToAction: 'LEARN_MORE',
    specialAdCategories: ['HOUSING']
  }
});
```
</Tab>
<Tab value="Python">
```python
boosted = client.ad_campaigns.boost_post(
    post_id="65f1c0a9e2b5af0012ab34cd",
    account_id="66b2e19d8c3f5a7e9d0b1c2d",
    ad_account_id="7123456789012345678",
    name="Listing tour, 12 Oak Street",
    goal="traffic",
    budget={"amount": 50, "type": "daily"},
    targeting={"countries": ["US"], "ageMin": 25},
    link_url="https://example.com/listings/12-oak-street",
    call_to_action="LEARN_MORE",
    special_ad_categories=["HOUSING"],
)
```
</Tab>
<Tab value="curl">
```bash
curl -X POST "https://zernio.com/api/v1/ads/boost" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postId": "65f1c0a9e2b5af0012ab34cd",
    "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
    "adAccountId": "7123456789012345678",
    "name": "Listing tour, 12 Oak Street",
    "goal": "traffic",
    "budget": { "amount": 50, "type": "daily" },
    "targeting": { "countries": ["US"], "ageMin": 25 },
    "linkUrl": "https://example.com/listings/12-oak-street",
    "callToAction": "LEARN_MORE",
    "specialAdCategories": ["HOUSING"]
  }'
```
</Tab>
</Tabs>

The category goes on the new TikTok campaign as `special_industries`. `POST /v1/ads/create` takes the same field, and `validateOnly` runs the same checks.

TikTok bans some targeting on these ads, so Zernio answers `400` naming the field before anything is created:

- ZIP codes
- gender, and ages under 18 (`targeting.ageMin`)
- interest keywords (`keyword:` ids in `targeting.interests`) and hashtag behaviors
- Smart Targeting (`smartTargeting`)
- lookalike audiences in `targeting.audienceInclude` or `targeting.audienceExclude`

Without an age, the ad group targets 18 and over. Countries, languages and interest categories still work.

The category is set when the campaign is created, so it cannot be combined with `existingCampaignId`, `adSetId` or `smartPlus`. `GET /v1/ads`, `GET /v1/ads/campaigns` and `GET /v1/ads/tree` return it as `specialAdCategories`.

## If it fails

| Error | Cause | Fix |
|---|---|---|
| `422` with code `invalid_field_value` on `targeting.countries` | No location sent | Send at least one of `targeting.countries`, `regions`, `cities`, `metros` or `zips`. |
| `400` with code `missing_required_field` on `sparkAuthCode` | `accountId` is a TikTok Ads-only connection and no Spark Code was sent | Pass `sparkAuthCode`, or use the id of a connected TikTok account. |
| `400` with code `invalid_field_value` on `postId` | A Zernio `postId` sent with a TikTok Ads-only connection | Pass the TikTok item id as `platformPostId`. |
| Budget rejected | Below TikTok's minimum | TikTok's minimum is $20 per ad set. |
| `400` with code `invalid_field_value` naming a targeting field | `specialAdCategories` is set and the field is targeting TikTok bans on housing, employment and credit ads | Drop that field ([Run a housing, employment or credit ad](#run-a-housing-employment-or-credit-ad)). |

## Related

- [Create a campaign](/platforms/tiktok-ads/create-ads): a standalone video ad and the bid strategy table.
- [Targeting fields](/platforms/tiktok-ads/targeting): what `targeting` takes.
- [TikTok](/platforms/tiktok): the posting account Spark Ads boost from.
- [Boost post](/ad-campaigns/boost-post): every field of the request.