PeumeAPI

Ads

Create an ad rule

Creates a rule that checks the campaigns, ad sets, ads, keywords or search terms of one ad account on a schedule and acts on each one that meets every condition.

$0.002 per callRuns on an account you connect

Call it

curl https://api.peume.com/v1/call/create-an-ad-rule \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "name": "your name",
    "accountId": "your accountId",
    "adAccountId": "your adAccountId",
    "level": "your level",
    "conditions": "your conditions",
    "actions": "your actions"
  }
}'

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-an-ad-rule.

Parameters

nameRequiredstring
accountIdRequiredstring

The ads connection (account ID from `GET /v1/accounts`).

adAccountIdRequiredstring

Platform ad account ID, from `GET /v1/ads/accounts`.

levelRequiredobject

level

campaignIdsarray

Only check these platform campaign IDs (or what sits in them). Leave out or send null to check the whole ad account.

filtersobject

filters

groupsobject

groups

lifecyclestring

Leave out or send null for none.

conditionsRequiredobject

conditions

actionsRequiredobject

actions

schedulestring

Leave it out to run every 60 minutes.

cooldownMinutesinteger

How long the rule leaves an object alone after acting on it.

Example: 1440

enabledboolean

Example: true

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.