Duplicate an ad set
Duplicates an ad set, including its ads and creatives by default (deepCopy: true),
via Meta's native POST /{adset-id}/copies. The copy is created paused so callers can
review before launching. campaignId retargets the copy into another campaign; omitted
= the source's own campaign. The new hierarchy materializes asynchronously — sync
discovery is triggered automatically (syncAfter: false to skip).
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Source platform ad set ID
"facebook" | "instagram"Destination platform campaign id (defaults to the source's campaign)
Copy child ads + creatives
true"PAUSED""ACTIVE" | "PAUSED" | "INHERITED_FROM_SOURCE"Reschedule the copy's start time
date-timedate-time"DEEP_RENAME" | "ONLY_TOP_LEVEL_RENAME" | "NO_RENAME"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.duplicateAdSet({ path: { adSetId: 'adset_abc123', }, body: { platform: 'facebook', },});console.log(data);{
"copiedAdSetId": "string",
"discovery": "triggered",
"raw": {}
}{
"error": "Unauthorized"
}Duplicate a campaign POST
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}/copies` endpoint. - **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. - **LinkedIn** has no native copy primitive; Zernio walks the source CampaignGroup → Campaigns → Creatives and recreates each entity, carrying over `type` / `costType` / `unitCost` / `optimizationTargetType` / `creativeSelection` / `objectiveType` / `format` / `dailyBudget` / `totalBudget` / `targetingCriteria` / `runSchedule` and every Creative's `content` object verbatim. `statusOption: INHERITED_FROM_SOURCE` is evaluated **per entity**: any Group / Campaign / Creative whose source is `ACTIVE` gets its clone activated too. Duplicating an ACTIVE campaign with `INHERITED_FROM_SOURCE` starts a second front of spend the moment the clone activates — the safe default is `PAUSED`. 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.
Duplicate an ad POST
Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (`syncAfter: false` to skip).