Ad Campaigns

Duplicate an ad set

Changed on

Copies an ad set, optionally with its ads and into another campaign, created paused so you can review it before launch.

The copy is created paused so callers can review before launching. campaignId retargets the copy into another campaign; omitted = the source's own campaign.

Meta: ads and creatives are included by default (deepCopy: true) via Meta's native POST /{adset-id}/copies; the new hierarchy materializes asynchronously and sync discovery is triggered automatically (syncAfter: false to skip).

TikTok: the ad group is read and recreated under the campaign with its targeting, bidding, budget and schedule (start reset to now); deepCopy: true recreates its ads too (default false). startTime, endTime and renameStrategy are ignored and statusOption must be PAUSED or absent. The copy appears on the next discovery sync.

post/v1/ads/ad-sets/{adSetId}/duplicate

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/ad-sets/{adSetId}/duplicate
  • Auth: HTTP bearer

Path parameters

adSetIdstring required

Source platform ad set 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' required
campaignIdstring

Destination platform campaign id (defaults to the source's campaign)

deepCopyboolean

Copy child ads + creatives

statusOption'ACTIVE' | 'PAUSED' | 'INHERITED_FROM_SOURCE'
startTimestring date-time

Reschedule the copy's start (ISO 8601). 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.

endTimestring date-time

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

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

Meta's native rename_strategy values. DEEP_RENAME renames the copied ad set and its copied ads with renamePrefix / renameSuffix. ONLY_TOP_LEVEL_RENAME renames only the copied ad set; its ads keep their source names. NO_RENAME keeps every source name. With no rename option at all, Meta appends its own - Copy suffix. Ignored on TikTok, where renamePrefix / renameSuffix still apply.

renamePrefixstring

Text prepended to each renamed object's name.

renameSuffixstring

Text appended to each renamed object's name.

syncAfterboolean

Response

Ad set duplicated

copiedAdSetIdstring

Platform ID of the new ad set

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

Meta's native copy response (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 new tiktok enum value to the request property

    • 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