Call it
curl https://api.peume.com/v1/call/pause-or-resume-a-campaign \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"campaignId": "your campaignId",
"status": "active",
"platform": "facebook"
}
}'const res = await fetch("https://api.peume.com/v1/call/pause-or-resume-a-campaign", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"campaignId": "your campaignId",
"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-campaign",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"campaignId": "your campaignId",
"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-campaign.
Parameters
campaignIdRequiredstringPlatform campaign 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 a campaign created in Ads Manager that has not synced, by numeric Meta id. Ignored when has the campaign. 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`.
