Call it
curl https://api.peume.com/v1/call/list-campaigns \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"page": 1,
"limit": 20,
"source": "all",
"live": false
}
}'const res = await fetch("https://api.peume.com/v1/call/list-campaigns", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"page": 1,
"limit": 20,
"source": "all",
"live": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/list-campaigns",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"page": 1,
"limit": 20,
"source": "all",
"live": False
}
},
)
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: list-campaigns.
Parameters
includeEmptybooleanMeta only. Set true to also list campaigns with ZERO ads, with `adCount: 0` and zeroed metrics. Campaign reads aggregate over ad documents, so such campaigns are normally invisible. The two-step create (campaign, then ads via `existingCampaignId`) leaves one behind whenever Meta rejects the ad step. Requires `accountId` and `adAccountId`, since an empty campaign has no ad row to resolve a token or ad account from.
pageintegerPage number (1-based)
Example: 1
limitintegerExample: 20
sourcestring`all` (default) returns both -created ads and those discovered from the platform's ad manager. Matches the web UI's default view. Pass `` to restrict to isExternal=false only. Status is NOT filtered by default; use the `status` param for that.
peume · all
Example: all
platformstringfacebook · instagram · tiktok · linkedin · pinterest · google · twitter · openai · reddit · microsoft · amazon · tradedesk …
statusstringFilter by derived campaign status (post-aggregation). `not_deleted` keeps every status except `cancelled`.
adAccountIdstringPlatform ad account ID (e.g. act_123 for Meta)
campaignIdstringPlatform campaign ID (the `platformCampaignId` on each returned campaign). Returns only that campaign, or an empty list when it is not visible to the caller. Mirrors the same filter on /v1/ads and /v1/ads/tree.
pageIdstringMeta only: Facebook Page ID. Campaigns have no Page of their own, so this keeps campaigns having at least one ad backed by this Page, with adCount and metrics computed over those ads only. Mirrors the same filter on /v1/ads and /v1/ads/tree.
accountIdstringAccount ID
fromDatestringStart of metrics date range (YYYY-MM-DD, inclusive). Defaults to 90 days ago when both date params are omitted.
toDatestringEnd of metrics date range (YYYY-MM-DD, inclusive). Defaults to today. Max 730-day range.
hasDeliverybooleanReturn only campaigns that delivered between `fromDate` and `toDate`: spend above zero, or impressions served at zero spend. Unlike `status`, which reads a campaign's CURRENT state, this filters on what happened inside the window. It filters the campaign set itself, so `pagination.total` counts only matching campaigns. Mirrors the same filter on /v1/ads/tree.
minSpendnumberReturn only campaigns whose spend between `fromDate` and `toDate` reaches this amount, in each campaign's OWN currency (the `currency` field on the campaign). Implies `hasDelivery`; `minSpend=0` applies no filter. Mirrors the same filter on /v1/ads/tree.
livebooleanRead the on/off switches live from the platform instead of returning synced values. See "Status freshness" in the operation description. - The fresh values are stored (later reads return them too), and the response carries `statusReadAt`, the time of the read. - At most 20 platform objects are read per request. - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`. **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over
Example: false
