Call it
curl https://api.peume.com/v1/call/forecast-ad-delivery \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"spec": "your spec",
"timeRangeStart": 10,
"timeRangeEnd": 10
}
}'const res = await fetch("https://api.peume.com/v1/call/forecast-ad-delivery", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"spec": "your spec",
"timeRangeStart": 10,
"timeRangeEnd": 10
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/forecast-ad-delivery",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"spec": "your spec",
"timeRangeStart": 10,
"timeRangeEnd": 10
}
},
)
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: forecast-ad-delivery.
Parameters
accountIdRequiredstringadAccountIdRequiredstringspecRequiredstringcampaignTypestringDefaults to SPONSORED_UPDATES.
SPONSORED_UPDATES · SPONSORED_INMAILS · DYNAMIC
timeRangeStartRequiredintegerUnix ms. Must be in the future.
timeRangeEndRequiredintegerUnix ms. Must be after start and within LinkedIn's max horizon.
objectiveTypestringoptimizationTargetstringWhen set, the forecast assumes auto-bidding. When unset, competingBid is required.
dailyBudgetnumberEither dailyBudget or totalBudget is required.
totalBudgetnumbercurrencystringISO 4217, defaults to USD.
competingBidobjectRequired for manual-bid forecasts (when optimizationTarget is not set).
enableAudienceNetworkbooleanDefaults to false. Required true for connectedTelevisionOnly.
enableAudienceExpansionbooleanDefaults to false.
connectedTelevisionOnlybooleanDefaults to false.
