Call it
curl https://api.peume.com/v1/call/list-ad-accounts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"inScopeOnly": false,
"live": false
}
}'const res = await fetch("https://api.peume.com/v1/call/list-ad-accounts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"inScopeOnly": false,
"live": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/list-ad-accounts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"inScopeOnly": False,
"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-ad-accounts.
Parameters
accountIdRequiredstringAccount ID
adAccountIdstringFilter response to a single platform ad account ID (e.g. `act_123` for Meta, advertiser_id for TikTok). Returns at most one item.
limitintegerClamp the returned `accounts[]` length. Useful for typeahead pickers on agency tokens with hundreds of advertisers.
inScopeOnlyboolean`true` returns only the ad accounts this connection accepts as `adAccountId` on the other /v1/ads endpoints, i.e. those inside its ad-account selection (every item then has `selected: true`). Without it, every ad account the login can reach is listed and `selected` flags selection membership. Exception: a Meta or TikTok connection with a selection lists unselected ad accounts only with `live=true`. - Meta, LinkedIn, X, Reddit and TikTok: drops the ad accounts with `selected: false`; a connection without a selection keeps them all. - Google Ads: also drops customers the login reaches that are
Example: false
liveboolean`true` lists the ad accounts the login reaches live from the platform instead of the stored catalog. A Meta or TikTok connection with an ad-account selection stores only its selected ad accounts, so without `live=true` it lists only those (a stale catalog falls back to a live listing). With it, every reachable ad account is listed, the others with `selected: false`.
Example: false
