Call it
curl https://api.peume.com/v1/call/read-an-ad-account-s-campaigns-and-ad-sets \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"status": "ACTIVE",
"limit": 200
}
}'const res = await fetch("https://api.peume.com/v1/call/read-an-ad-account-s-campaigns-and-ad-sets", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"status": "ACTIVE",
"limit": 200
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/read-an-ad-account-s-campaigns-and-ad-sets",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"status": "ACTIVE",
"limit": 200
}
},
)
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: read-an-ad-account-s-campaigns-and-ad-sets.
Parameters
accountIdRequiredstringSocialAccount id (posting or ads variant) used to resolve the platform token.
adAccountIdRequiredstringMeta ad account id (act_<n>), TikTok advertiser id (digits) or Pinterest ad account id (digits).
statusstringComma-separated Meta `effective_status` values to keep: ACTIVE, PAUSED, IN_PROCESS, WITH_ISSUES, DELETED, ARCHIVED, and CAMPAIGN_PAUSED (ad sets only; the campaigns level ignores it). Defaults to every status except DELETED and ARCHIVED. An unknown value is a 400. TikTok takes a single value: ACTIVE, PAUSED or DELETED. Pinterest takes ACTIVE, PAUSED and ARCHIVED (see the description).
Example: ACTIVE
levelstringRead only one level. Required with `after`. Both levels are read when omitted.
campaign · adSet
limitintegerMaximum rows per level in this response.
Example: 200
afterstringCursor from `paging.campaigns.after` or `paging.adSets.after` of a previous response. Requires `level` (and on TikTok the same `limit`).
