Duplicate an ad
Copies a single Meta ad, optionally into another ad set, created paused so you can review it before launch.
It duplicates the ad via Meta's native POST /{ad-id}/copies. The copy is created paused.
adSetIdretargets the copy into another ad set; omitted = the source's own ad set.- Accepts the Zernio ad id or the platform ad id.
- A sync discovery starts automatically and runs after the response (
syncAfter: falseto skip). The copy is readable through Zernio once it finishes, usually within a few minutes. Until then, calls that take a copied id return 404, so retry them.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Path parameters
Zernio ad ID or platform ad ID
Body
application/jsonOptional parameters7 fields
Destination platform ad set id (defaults to the source's ad set)
PAUSEDOne of ACTIVE | PAUSED | INHERITED_FROM_SOURCEDEEP_RENAME | ONLY_TOP_LEVEL_RENAME | NO_RENAMEMeta's native rename_strategy values. An ad has no copied children, so DEEP_RENAME and ONLY_TOP_LEVEL_RENAME both rename the copy with renamePrefix / renameSuffix, and NO_RENAME keeps the source name. With no rename option at all, Meta appends its own - Copy suffix.
Text prepended to the copy's name.
Text appended to the copy's name.
truefalsePoint the copy at the source ad's creative object instead of copying it. The copy keeps the same Facebook post and Instagram media, their existing likes, comments and shares, and the full creative setup (text variations included).
This is what Ads Manager's "show existing reactions, comments and shares" does; Meta's native copy always publishes new posts.
A creative belongs to one ad account, so adSetId must be in the source ad's account. 400 when the source ad has no creative yet.
Headers
OptionalOptional 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.
Responses
Success· the request worked
Errors· the request failed
How it behaves
Creative settings
Creative settings returned by Meta, including explicit promotion metadata and creativeFeatures, are preserved when the native copy requires a creative rebuild. Metadata Meta does not return cannot be recovered.
Fallback rebuild
When Meta refuses the native copy with its capability error (code 3), which happens for some creatives built by other tools, the ad is rebuilt instead:
- A new creative from the source's returned spec.
- A new ad in the target ad set, carrying the source name, status option, rename options and tracking specs.
Update ad
Changes an ad's status, budget, targeting or creative and applies the change on the platform. Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. ### Per-platform support - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, `name` (renames the ad), targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: see the Google sections below. - **LinkedIn**: status, budget, targeting and creative (details below). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `feature_not_available`. OpenAI Ads budget is the campaign's spend cap, daily or lifetime (see `budget.type` below). - **Reddit Ads**: status, budget, `name` (renames the ad) and targeting (details below). ### Google Supported: status, budget, and these targeting edits: - KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords` - DEVICE bid adjustments via `targeting.devices` - LOCATION edits via `targeting.locations` (or the equivalent top-level `targeting.countries` / `regions` / `cities` / `zips` / `metros`) - LANGUAGE edits via `targeting.languages` Each list you send becomes the FULL new set of its kind: criteria not in the list are removed. Devices are the exception: Google cannot remove them, so they are switched off with a bid modifier of 0 instead. A kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate it post-create without recreating the campaign. Creative edits are dispatched on the ad's `advertisingChannelType`. Every supported field replaces a whole set; a field you omit is preserved. - **Search**: top-level `headlines`, `descriptions` and `finalUrls`. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported. - **Display**: top-level `headlines` (1-5, no pinnedField, display ads have no pinned positions), `descriptions` (1-5) and `finalUrls`, plus `creative.longHeadline`, `creative.businessName`, `creative.imageUrl` (the landscape marketing image) and `creative.squareImageUrl`. - **Performance Max**: top-level `assetGroup`, which swaps asset roles on the ad's asset group. The other creative fields return 422 for this channel, and `assetGroup` returns 422 on any other channel. - **Demand Gen**: top-level `demandGen` (see GoogleDemandGenUpdate): creative, channel and audience changes in one atomic Google request. The other creative fields return 422 for this channel. For Display, each image URL is uploaded as a new Google asset and the ad is pointed at it. Google assets are immutable, so the previous asset stays in the account's asset library. A new landscape image also updates `creative.assetResourceName` to the new asset, and each replaced image updates its own role in `creative.assets`. For Demand Gen, `targeting` takes locations, languages, `locationTargetingType` and `devices`. Locations and languages are written to the ad's ad group, which Demand Gen requires, so they apply to every ad in that ad group. Campaigns migrated from Discovery that still target on the campaign keep being written there. ### LinkedIn - **Status and budget**: supported. - **Targeting**: countries or regions, excludedLocations (countries), the B2B facets, and audience segments. Applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge. - **Creative**: uploads new media, creates a replacement inline creative on the same campaign, and removes the old one (it is deleted, the ad's `platformAdId` and `creative.creativeId` move to the new creative, and the new creative keeps the old one's held-off state: `DRAFT` stays `DRAFT`). - **Name**: updating `name` returns 400 (LinkedIn does not support renaming an ad). ### Reddit Ads - `budget` goes to the ad's ad group, or to its campaign when the ad group spends a campaign budget. It keeps its daily or lifetime type (422 to switch). - `targeting` REPLACES the ad group's whole targeting (geo, communities, conversation keywords, interests, audiences, languages, gender), so it applies to every ad in the ad group. - `creative` returns 501: a Reddit ad runs a post, so create a new ad with the new creative instead. ### Google location and language replacement Locations, languages and devices are campaign-level criteria on Google, so these edits apply to every ad group and ad in the ad's campaign. Send the complete list you want to keep. Zernio diffs it against the campaign's live criteria and sends the removes and the creates in ONE `googleAds:mutate`, so the campaign is never left with a half-applied set. Criteria already in the list keep their criterion ID and history. Excluded (negative) locations are left untouched. - An empty location list returns 400. A Google campaign with no location criteria targets every country, which is never what "remove my locations" means, so omit the field instead. - Send either `targeting.locations` or the top-level geo fields, not both: mixing them returns 400. ### Google radius targeting `customLocations` is editable and is replaced the same way, but as its OWN set. Google models a place (LOCATION) and a point plus radius (PROXIMITY) as different criterion types, so the two are independent: - Sending `customLocations` replaces every radius and leaves the cities and countries alone. - Sending places replaces those and leaves the radius alone. - Send `customLocations: []` to drop radius targeting entirely. A circle you re-send unchanged keeps its criterion ID rather than being removed and recreated. ### Google keyword replacement These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. Text comparison does not trim whitespace. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ "text": "plumber", "matchType": "exact" }` preserves it; sending `"plumber"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. ### Other keyword endpoints - To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). - Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword. - Use `DELETE /v1/ads/keywords/{keywordId}` to remove it.
Cancel an ad
Deletes an ad on the platform while keeping its history, and removes empty parents only when they were created through this API. The ad is deleted on the platform and marked as cancelled in the database. It is preserved for history. - OpenAI Ads has no delete API: the ad is archived instead (a terminal state, the closest equivalent). - Reddit Ads has no delete either: the ad is archived (`configured_status` ARCHIVED). To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`. ### Parents Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. ### Meta When the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too. The campaign follows once it holds no other ad set. ### LinkedIn The ad is a creative inside a campaign inside a campaign group. - The creative is always removed. - The campaign is removed only when Zernio created it and LinkedIn lists no other creative in it that is not archived, canceled or deleted. - The campaign group is removed only when Zernio created it and LinkedIn lists no other campaign in it that is not canceled or deleted (archived campaigns count). If the creative itself cannot be removed the request fails and no parent is touched. ### X The ad is a promoted post inside a line item inside a campaign. - The promoted post is always removed. - The line item is removed only when Zernio created it (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and X lists no other undeleted promoted post in it. - The campaign is removed only when Zernio created it and X lists no other undeleted line item in it. If X refuses the promoted post delete the request fails and no parent is touched.