Call it
curl https://api.peume.com/v1/call/duplicate-a-campaign \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"campaignId": "your campaignId",
"platform": "facebook",
"deepCopy": true,
"statusOption": "PAUSED",
"syncAfter": true
}
}'const res = await fetch("https://api.peume.com/v1/call/duplicate-a-campaign", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"campaignId": "your campaignId",
"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-a-campaign",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"campaignId": "your campaignId",
"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-a-campaign.
Parameters
campaignIdRequiredstringSource platform campaign 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 · linkedin · google
deepCopybooleanCopy child ad sets + ads + creatives + targeting
Example: true
statusOptionstringACTIVE = launch the clone immediately (spends the moment LinkedIn approves it). PAUSED = clone stays DRAFT, safe default. Google only accepts PAUSED. INHERITED_FROM_SOURCE = mirror each entity's source status per-entity. Duplicating an ACTIVE campaign this way starts a second front of spend.
ACTIVE · PAUSED · INHERITED_FROM_SOURCE
Example: PAUSED
startTimestringReschedule the copied hierarchy's start (ISO 8601). TikTok defaults to a start a few minutes after the copy. - 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 it is read as UTC. - Google: the date is used as a whole day in the customer timezone.
endTimestringReschedule the copied hierarchy's end, read like `startTime`; a date-only end runs to 23:59:59 local. Defaults to the source's end.
renameStrategystringMeta'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. Google returns 400, since its campaign names are unique per account. 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 ob
DEEP_RENAME · ONLY_TOP_LEVEL_RENAME · NO_RENAME
renamePrefixstringText prepended to each renamed object's name.
renameSuffixstringText appended to each renamed object's name. On LinkedIn and Google an omitted suffix defaults to ` (Copy)` when no prefix is sent.
syncAfterbooleanTrigger ads discovery on the owning account after the copy succeeds
Example: true
