Updates one or more existing piggyback tracking pixels for the specified campaign in a single batch request.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/piggyback/campaign/update.do
Updates one or more existing piggyback tracking pixels for the specified campaign in a single batch request. Each element in the request body array is a map containing the piggyback fields to update (e.g., code/URL, type, status, sampling). The caller must have update permissions on the campaign and the Piggyback Pixel Tracking permission. Returns a JSON object with a 'success' boolean indicating whether all updates succeeded.
Query Params
campaignIdintegerrequired
The unique numeric identifier of the campaign whose piggyback pixels should be updated
2001
Body
A JSON body. An example, built from the field definitions:
[
{}
]
Responses
200
Campaign piggyback updated successfully
400
An invalid field (per-field errors); nothing is saved
401
Unauthorized - authentication error
403
Forbidden - no rights on the campaign, or the Piggyback Pixel Tracking permission is not enabled
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/piggyback/campaign/update.do?campaignId=2001");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new StringContent("[{\"id\":501,\"active\":true,\"sampling\":50}]", Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());