Browse the help center

Create a new rule

Creates a new targeting rule in the system.

Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/rule/create.do

Creates a new targeting rule in the system. The request body must be a JSON object containing the rule's name, type (CAMPAIGN or INVENTORY), active status, default-for flags, and an optional ruleMatches array. Each rule match specifies categories (AdvertisingCategory IDs for CAMPAIGN type, PublisherCategory IDs for INVENTORY type), label IDs, a logical operator (AND/OR), and an include/exclude flag. Returns a JSON object with 'success: true' and the newly created 'ruleId', or validation errors if the input is invalid. Requires authentication and CREATE permission on the RULES static ACL identity.

Body

A JSON body. An example, built from the field definitions:

{
  "id": "200",
  "name": "Block Adult Content",
  "active": "true",
  "type": "CAMPAIGN"
}

Responses

200

Rule created successfully

400

Missing name or type, or a rule match naming unknown categories or labels (per-field errors)

401

Unauthorized - authentication error

403

Forbidden - insufficient permissions

500

Internal server error

Please disable Adblock
Are you using adblock? Disable it and reload the page to proceed to the destination page.

A registration has already been submitted from this page. Please try again in 10 minutes.