Ad Campaigns

Duplicate a campaign

Changed on

Copies a campaign with its ad sets, ads, creatives and targeting, created paused so you can review it before launch.

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

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/campaigns/{campaignId}/duplicate
  • Auth: HTTP bearer

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 (ISO 8601). On Meta and TikTok a value without an offset (YYYY-MM-DD, YYYY-MM-DD HH:MM:SS or YYYY-MM-DDTHH:MM:SS) is read in the ad account timezone; LinkedIn ad accounts carry no timezone, so there it is read as UTC. TikTok defaults to a start a few minutes after the copy.

endTimestring date-time

Reschedule the copied hierarchy's end, read like startTime; a date-only end runs to 23:59:59 local. Defaults to the source's end.

renameStrategy'DEEP_RENAME' | 'ONLY_TOP_LEVEL_RENAME' | 'NO_RENAME'

Meta's native rename_strategy values. DEEP_RENAME renames the copied campaign and every copied child (ad sets, ads) with renamePrefix / renameSuffix. ONLY_TOP_LEVEL_RENAME renames only the copied campaign; children keep their source names. NO_RENAME keeps every source name. With no rename option at all, Meta appends its own - Copy suffix; LinkedIn defaults to DEEP_RENAME (its campaign group and campaigns are renamed). Ignored on TikTok, where renamePrefix / renameSuffix apply to every copied object.

renamePrefixstring

Text prepended to each renamed object's name.

renameSuffixstring

Text appended to each renamed object's name. On LinkedIn an omitted suffix defaults to (Copy).

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

    • warning

      added the new account enum value to the / response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status