Skip to main content

Update Segment Targeting

Use this endpoint to adjust targeting settings for a specific segment within a campaign — including age, gender, OS, and device type.

L
Written by Lior Avidar
Updated over a month ago

Endpoint:
PUT /external/v1/campaigns/:campaignId/segments/:segmentId/targeting

Required Header:
Authorization: Bearer YOUR_API_TOKEN


Path Parameters:

  • campaignId (Number) – The campaign that owns the segment

  • segmentId (Number) – The ID of the segment to update


Request Body Example:

{
"data": {
"age": [18, 24, 35],
"gender": ["female"],
"os": ["android"],
"device_type": ["phone"]
}
}

Targeting Fields:

  • age: Array of age groups (18, 24, 35, 45, 55, 65)

  • gender: "male", "female", or "unknown"

  • os: "android" or "ios"

  • device_type: "phone", "tablet", or "desktop"

Omit any field you do not wish to change.


Example Response:

{
"segmentId": 9876,
"updated": true
}

Validation Rules:

  • All fields must match allowed enums

  • Invalid combinations or unrecognized values will return a 400 error


Possible Errors:

  • 400invalid age group: Age value not supported

  • 400invalid os: Must be "android" or "ios"

  • 404not found: Campaign or segment not found

  • 403unauthorized: You lack permission to update this segment

Did this answer your question?