Call it
curl https://api.peume.com/v1/call/create-a-standalone-ad-group \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"platform": "facebook",
"campaignId": "your campaignId",
"name": "your name",
"status": "PAUSED"
}
}'const res = await fetch("https://api.peume.com/v1/call/create-a-standalone-ad-group", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"platform": "facebook",
"campaignId": "your campaignId",
"name": "your name",
"status": "PAUSED"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/create-a-standalone-ad-group",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"platform": "facebook",
"campaignId": "your campaignId",
"name": "your name",
"status": "PAUSED"
}
},
)
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-a-standalone-ad-group.
Parameters
stagebooleanSend true to stage this create instead of sending it. Nothing is created on the ad network; the response is `202` with the staged change. Create it with POST /v1/ads/changes/{changeId}/confirm. Google only: `platform: reddit` or `snapchat` returns 400 `staging_not_supported`.
accountIdRequiredstringSocialAccount id owning the Google Ads or Reddit Ads connection.
platformRequiredstring"google", "reddit" and "snapchat" are implemented; every other value returns 501.
facebook · instagram · tiktok · linkedin · pinterest · google · twitter · openai · reddit · snapchat
campaignIdRequiredstringPlatform campaign ID the ad group is created under (numeric on Google).
nameRequiredstringstatusstringACTIVE · PAUSED
Example: PAUSED
maxCpcnumberMax CPC of the new ad group, in the account's currency units. Send it when the campaign uses Manual CPC: Google gives an ad group without one a 0.01 bid.
adAccountIdstringPlatform ad account ID: the Google customer ID (digits only, only required when the connection has more than one) or the Reddit ad account id (required).
customerIdstringGoogle only. Alias of adAccountId, kept for existing callers
budgetAmountnumberReddit only. Budget of the new ad group, in the ad account's currency units. Required when the campaign has no campaign budget; 400 under campaign budget optimization, where the campaign budget funds the ad group.
budgetTypestringReddit only. Sent together with budgetAmount.
daily · lifetime
startDatestringReddit only. ISO 8601 start of the ad group. Defaults to now, or to the campaign start when it is in the future.
endDatestringReddit only. ISO 8601 end of the ad group. Defaults to the campaign end.
targetingstringReddit: the full targeting object. Google: locations and languages only, on a Demand Gen campaign.
promotedObjectobjectReddit only. The pixel and the conversion event the ad group optimizes toward.
optimizationGoalstringReddit only. VIDEO_VIEW_6S (default) or VIDEO_VIEW_15S on a video views campaign.
bidStrategystringReddit only. Defaults to LOWEST_COST_WITHOUT_CAP. Not accepted under campaign budget optimization.
LOWEST_COST_WITHOUT_CAP · LOWEST_COST_WITH_BID_CAP · COST_CAP
bidAmountnumberReddit only. Bid cap in currency units, sent with bidStrategy.
