Ad Campaigns

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}/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, and 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.

post/v1/ads/campaigns/{campaignId}/duplicate

Path parameters

campaignIdstring required

Source platform campaign ID

Headers

Idempotency-Keystring

Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. Only 2xx responses are stored, so a request that failed with a 4xx can be retried with a corrected body under the SAME key.

Request body

platform'facebook' | 'instagram' | 'tiktok' | 'linkedin' required
deepCopyboolean

Copy child ad sets + ads + creatives + targeting

statusOption'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE'

ACTIVE = launch the clone immediately (spends the moment LinkedIn approves it). PAUSED = clone stays DRAFT, safe default. INHERITED_FROM_SOURCE = mirror each entity's source status per-entity. Duplicating an ACTIVE campaign this way starts a second front of spend.

startTimestring date-time

Reschedule the copied hierarchy's start time

endTimestring date-time
renameStrategy'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME'
renamePrefixstring
renameSuffixstring
syncAfterboolean

Trigger ads discovery on the owning account after the copy succeeds

Response

Campaign duplicated

copiedCampaignIdstring

Platform ID of the new campaign

discovery'triggered' | 'skipped' | 'failed'
rawobject

Platform-native response from the copy endpoint (Meta includes ad_object_ids for child copies)

Changes