Call it
curl https://api.peume.com/v1/call/submit-async-insights-report \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"objectId": "your objectId"
}
}'const res = await fetch("https://api.peume.com/v1/call/submit-async-insights-report", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"objectId": "your objectId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/submit-async-insights-report",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"objectId": "your objectId"
}
},
)
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: submit-async-insights-report.
Parameters
accountIdRequiredstringSocialAccount id (posting or ads variant).
objectIdRequiredstringMeta insights node: act_<n>, campaign id, ad set id or ad id.
levelstringad · adset · campaign · account
fieldsstringComma-separated Graph insights fields.
breakdownsstringComma-separated Graph breakdowns.
actionBreakdownsstringComma-separated Graph action breakdowns (e.g. action_type,action_destination). Pass `none` to clear Meta's default action_type breakdown, needed for some non-action breakdowns such as instagram_ads_follow_type.
actionAttributionWindowsarrayMeta attribution windows (e.g. ["7d_click", "1d_view"]). Action values are returned keyed per window.
actionReportTimestringWhen actions are counted: impression, conversion or mixed.
useUnifiedAttributionSettingbooleanUse the ad sets' own attribution settings for action counting.
filteringarrayMeta filter objects, applied server-side.
datePresetstringMutually exclusive with fromDate/toDate.
fromDatestringtoDatestringtimeIncrementstring