Endpoint:
PUT /external/v1/campaigns/: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:
{
"data": {
"daily_cap": 50,
"monthly_cap": 1200,
"total_cap": 2500
}
}
Accepted Fields:
daily_cap
: Integer – Daily delivery cap (spend or impressions)monthly_cap
: Integer – Monthly captotal_cap
: Integer – Lifetime segment cap
You may omit any field you don’t want to change.
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