Call it
curl https://api.peume.com/v1/call/pause-or-resume-a-single-ad-set \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"adSetId": "your adSetId",
"status": "active",
"platform": "facebook"
}
}'const res = await fetch("https://api.peume.com/v1/call/pause-or-resume-a-single-ad-set", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"adSetId": "your adSetId",
"status": "active",
"platform": "facebook"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/pause-or-resume-a-single-ad-set",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"adSetId": "your adSetId",
"status": "active",
"platform": "facebook"
}
},
)
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: pause-or-resume-a-single-ad-set.
Parameters
adSetIdRequiredstringPlatform ad set ID
statusRequiredstringactive · paused
platformRequiredstringfacebook · instagram · tiktok · linkedin · pinterest · google · twitter · openai · reddit · microsoft · amazon · tradedesk …
accountIdstringA or Facebook connection id (also accepted in the query). Changes the status of an ad set created in Ads Manager that has not synced, by numeric Meta id. Ignored when has the ad set. It echoes the requested status; `stage: true` answers 400.
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`.
