Call it
curl https://api.peume.com/v1/call/duplicate-an-ad-set \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"adSetId": "your adSetId",
"platform": "facebook",
"deepCopy": true,
"statusOption": "PAUSED",
"syncAfter": true
}
}'const res = await fetch("https://api.peume.com/v1/call/duplicate-an-ad-set", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"adSetId": "your adSetId",
"platform": "facebook",
"deepCopy": true,
"statusOption": "PAUSED",
"syncAfter": true
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/duplicate-an-ad-set",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"adSetId": "your adSetId",
"platform": "facebook",
"deepCopy": True,
"statusOption": "PAUSED",
"syncAfter": True
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: duplicate-an-ad-set.
Parameters
adSetIdRequiredstringSource platform ad set ID
stagebooleanSend true to store this write as a staged change instead of applying it. The response is `202` with the change, and POST /v1/ads/changes/{changeId}/confirm applies it later. Cannot be combined with `validateOnly`.
platformRequiredstringfacebook · instagram · tiktok
campaignIdstringDestination platform campaign id (defaults to the source's campaign)
deepCopybooleanCopy child ads + creatives
Example: true
statusOptionstringACTIVE · PAUSED · INHERITED_FROM_SOURCE
Example: PAUSED
startTimestringReschedule 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.
endTimestringReschedule the copy's end, read like `startTime`; a date-only end runs to 23:59:59 local.
renameStrategystringMeta'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.
DEEP_RENAME · ONLY_TOP_LEVEL_RENAME · NO_RENAME
renamePrefixstringText prepended to each renamed object's name.
renameSuffixstringText appended to each renamed object's name.
syncAfterbooleanExample: true
websiteOnlybooleanMeta only. Rebuilds each copied ad (new creative and ad) instead of using Meta's native copy, so the creative carries applink_treatment web_only and Ads Manager shows Website as the only destination. - Omitted or false: keeps the native copy. - 400 with `deepCopy: false`, and when an ad runs an existing post (its creative cannot be rebuilt). - Meta rejects it when the campaign uses Website and App conversion locations.
