Skip to main content

Update Segment Capping

Use this endpoint to define or adjust daily, monthly, or total capping rules for a specific segment.

L
Written by Lior Avidar
Updated over a month ago

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 segment

  • segmentId (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 cap

  • total_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:

  • 400invalid cap: Cap value must be positive

  • 400cap hierarchy error: Daily cap exceeds monthly cap

  • 403unauthorized: Token missing or lacks write permission

  • 404not found: Segment or campaign not found

Did this answer your question?