Duplicate a campaign
Duplicates a campaign, including its ad sets, ads, creatives, and
targeting by default (deepCopy: true). The copy is created paused
so callers can review before launching.
Per-platform implementation:
- Meta uses the native
POST /{campaign-id}/copiesendpoint. - TikTok has no native copy primitive; Zernio walks the source
graph (
/v2/campaign/get/,/v2/adgroup/get/,/v2/ad/get/) and recreates each entity via the corresponding/create/endpoints, carrying over budget / targeting / bid_type / bid_price / deep_bid_type / creative fields. Spark Ad linkage (tiktok_item_id) is preserved.
The new hierarchy is asynchronous to materialize in our DB — we
trigger sync discovery automatically. Set syncAfter: false to
skip and poll /v1/ads/tree on your own cadence.
Other platforms return 501 Not Implemented.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Source platform campaign ID
"facebook" | "instagram" | "tiktok"Copy child ad sets + ads + creatives + targeting
true"PAUSED""ACTIVE" | "PAUSED" | "INHERITED_FROM_SOURCE"Reschedule the copied hierarchy's start time
date-timedate-time"DEEP_RENAME" | "ONLY_TOP_LEVEL_RENAME" | "NO_RENAME"Trigger ads discovery on the owning account after the copy succeeds
trueResponse Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcampaigns.duplicateAdCampaign({ path: { campaignId: 'campaign_abc123', }, body: { platform: 'facebook', },});console.log(data);{
"copiedCampaignId": "string",
"discovery": "triggered",
"raw": {}
}{
"error": "Unauthorized"
}Pause or resume many campaigns POST
Process up to 50 campaigns in one call. Each campaign is updated concurrently and the response contains a per-campaign result so a single bad row does not fail the whole batch.
List custom audiences GET
Returns custom audiences for the given ad account. Supports Meta, Google, TikTok, Pinterest, LinkedIn, and X (Twitter).