Adds new rule match entries to an existing rule identified by its numeric ID.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/rule/{ruleId}/matches/add.do
Adds new rule match entries to an existing rule identified by its numeric ID. The request body must be a JSON array of rule match objects, each containing category IDs (AdvertisingCategory for CAMPAIGN rules, PublisherCategory for INVENTORY rules), label IDs, a logical operator (AND/OR), and an include/exclude flag. Duplicate entries (matching existing rule matches or duplicates within the request) are rejected with validation errors. Returns a JSON object with 'success: true' on completion, or validation error details. Requires authentication and UPDATE permission on the RULES static ACL identity.
Path Params
ruleIdintegerrequired
The unique numeric identifier of the rule to add matches to
200
Body
A JSON body. An example, built from the field definitions:
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/rule/200/matches/add.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("[{\"id\":\"301\",\"include\":\"true\",\"operator\":\"AND\"}]", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());