Endpoint:
PUT /external/:campaignId/segments/:segmentId/capping
Required Header:
Authorization: Bearer YOUR_API_TOKEN
Path Parameters:
campaignId(Number) – The ID of the campaign that owns the segmentsegmentId(Number) – The ID of the segment to update
Request Body Example:
{
"limitations": {
"key": "daily",
"cap": 40
}
}Accepted Fields
Each cap object must include:
metric(string) – One of:
budget,completions,clicks,impressions,notificationskey(string) – Defines the type of interval:daily– supports all metricsmonthly– onlybudget,completionstotal– onlybudget,completions
cap(float) – The limit value
Example Response:
{
"segmentId": 9876,
"updated": true
}Validation Rules:
Values must be integers ≥ 0
Daily ≤ Monthly, Monthly ≤ Total
Lowering caps below previous usage may return an error
Possible Errors:
400 –
invalid cap: Cap value must be positive400 –
cap hierarchy error: Daily cap exceeds monthly cap403 –
unauthorized: Token missing or lacks write permission404 –
not found: Segment or campaign not found