Call it
curl https://api.peume.com/v1/call/create-reach-frequency-prediction \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"startDate": "your startDate",
"endDate": "your endDate"
}
}'const res = await fetch("https://api.peume.com/v1/call/create-reach-frequency-prediction", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"startDate": "your startDate",
"endDate": "your endDate"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/create-reach-frequency-prediction",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"startDate": "your startDate",
"endDate": "your endDate"
}
},
)
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: create-reach-frequency-prediction.
Parameters
accountIdRequiredstringSocialAccount id (posting or ads variant).
adAccountIdRequiredstringPlatform ad account id (Meta act_<n>, Google customer id, LinkedIn account id,...).
budgetAmountnumberWhole currency units. Exactly one of budgetAmount / reach.
reachintegerTarget unique reach. Exactly one of budgetAmount / reach.
startDateRequiredstringCampaign window start (must be in the future).
endDateRequiredstringfrequencyCapintegerMax impressions per person over the window.
targetingobjectCanonical camelCase TargetingSpec (same shape as /v1/ads/create's `targeting`). Defaults to countries: [US].
placementsobjectMeta placements object (same shape as /v1/ads/create's `placements`).
