Performs an advanced search over campaigns using filter parameters submitted as a JSON request body.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/search/campaigns.do
Performs an advanced search over campaigns using filter parameters submitted as a JSON request body. Supports pagination (limit/page), sorting (sortBy/sortDir), active status filtering, name filtering, filtering by campaign ids (ids), and targeting parameter filters. The response optionally includes targeting, pricing, and limits data for each campaign depending on 'showTargeting', 'showPricing', and 'showLimits' flags (subject to the caller's permissions for MANAGE_DEMAND_TARGETING, MANAGE_CAPPING_AND_LIMITATIONS, and MANAGE_PRICING respectively). Users with CAMPAIGNS SHARE permission see all campaigns; otherwise only campaigns shared with the authenticated user are returned. Response is a JSON object with 'data' array and 'total' count.
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/search/campaigns.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("{\"limit\":\"25\",\"page\":\"0\",\"sortBy\":\"1\",\"sortDir\":\"desc\"}", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());