Call it
curl https://api.peume.com/v1/call/update-ad \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"adId": "your adId"
}
}'const res = await fetch("https://api.peume.com/v1/call/update-ad", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"adId": "your adId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/update-ad",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"adId": "your adId"
}
},
)
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: update-ad.
Parameters
adIdRequiredstringvalidateOnlybooleanMeta only. Sends every write of this update to Meta with `execution_options: ["validate_only"]`. Meta checks it and changes nothing; stores nothing and fires no webhook. - Answers `200` with `{ validateOnly: true, results, message }`, the shape of a validateOnly POST /v1/ads/create. - The checks runs before the write (body, bid strategy, live ads allowance) run as for a real update. - `true` on any other platform is a 400 naming `validateOnly`; `false` is ignored. - Cannot be combined with `stage` (400 `mutually_exclusive_fields`). Counts toward the Meta ad account write guar
stagebooleanSend true to stage this change instead of applying it. Nothing is written to the ad network; the response is `202` with the staged change and its diff. Apply it with POST /v1/ads/changes/{changeId}/confirm. Meta, Google, TikTok, X, Snapchat and Reddit; cannot be combined with `validateOnly` or `dryRun`.
headlinesarrayGoogle Search and Display only. Replaces the complete headline list. Search takes 3-15, Display 1-5 and rejects pinnedField; the count is checked once the ad's channel is known. No padding or truncation on update.
descriptionsarrayGoogle Search and Display only. Replaces the complete description list. Search takes 2-4, Display 1-5 and rejects pinnedField. No padding or truncation on update.
finalUrlsarrayGoogle Search and Display only. Replaces final URLs. Omitted lists stay unchanged. For Performance Max use assetGroup.finalUrl.
path1stringGoogle Search only. First display path shown after the domain in the ad URL. Send an empty string to clear it.
path2stringGoogle Search only. Second display path, shown after path1. Google requires path1 when path2 is set. Send an empty string to clear it.
assetGroupstringGoogle Performance Max only. Replaces whole asset roles on the ad's asset group. Returns 422 on any other platform or channel.
demandGenstringGoogle Demand Gen only. Returns 422 on any other platform or channel.
statusstringactive · paused
budgetobjecttargetingobjectTargeting update. - Meta + TikTok: demographics/interests. - Google: keyword and device bid adjustment edits only. - LinkedIn: locations, B2B facets, interests, behaviors, age, gender, languages, audiences. `interests` and `behaviors` take `{ id }` or a bare id; a malformed entry is a 400. - Pinterest / X: return 501. **Partial update** on Meta, TikTok and LinkedIn: every targeting setting you do not send is preserved. - Meta: Advantage+ audience, placements, custom audiences, exclusions, interests, languages. - TikTok: languages, interest keywords, devices, behaviours. - LinkedIn: skills,
creativeobjectReplace or patch the ad's creative. Meta, TikTok, and LinkedIn. **Meta**: patch-style. - Pass any subset: omitted fields are preserved from the live creative, including media (`image_hash`/`video_id` reused, no re-upload) and `url_tags`. Sending the full set (`headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`) rebuilds the creative from scratch. - On lead ads, the instant form is kept through every edit, and `linkUrl` is ignored: Meta requires a lead ad's links to stay on its instant-form link. An edit that changes only `linkUrl` leaves the ad's creative as it is. - Partial patching
namestringRename the ad. Now propagated to Meta (POST /{ad-id}); non-Meta platforms return 501.
