Call it
curl https://api.peume.com/v1/call/get-facebook-post-monetization-earnings \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"postId": "your postId"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-facebook-post-monetization-earnings", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"postId": "your postId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-facebook-post-monetization-earnings",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"postId": "your postId"
}
},
)
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-facebook-post-monetization-earnings.
Parameters
accountIdRequiredstringThe SocialAccount ID for the connected Facebook Page.
postIdRequiredstringThe platform post ID, exactly as returned in platformAnalytics[].platformPostId by /v1/analytics: "{pageId}_{postId}", or the bare video ID for Reels.
metricsstringComma-separated list of monetization metrics. Defaults to both: - content_monetization_earnings - monetization_approximate_earnings content_monetization_earnings always carries unit "micro_amount" plus an ISO 4217 "currency". monetization_approximate_earnings is always a bare number, so its unit is "unspecified" and its "currency" is null. The two are on different scales and are not comparable to each other. Any other metric name is rejected with 400.
