Call it
curl https://api.peume.com/v1/call/get-daily-aggregated-metrics \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"source": "all",
"attribution": "publish"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-daily-aggregated-metrics", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"source": "all",
"attribution": "publish"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-daily-aggregated-metrics",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"source": "all",
"attribution": "publish"
}
},
)
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: get-daily-aggregated-metrics.
Parameters
platformstringFilter by platform (e.g. "instagram", "tiktok"). Omit for all platforms.
accountIdstringFilter by account ID
fromDatestringInclusive start date (ISO 8601). Defaults to 180 days ago.
toDatestringInclusive end date (ISO 8601). Defaults to now.
sourcestringFilter by post origin. "late" for posts published via, "external" for posts imported from platforms.
all · late · external
Example: all
attributionstringHow each post's engagement is attributed to a day. - "publish" (default): sums each post's lifetime total on its publish date. - "received": buckets the per-day increase in engagement by the day it actually arrived (engagement-over-time), so engagement on older posts appears on the day it was gained rather than the post's publish date.
publish · received
Example: publish
