Endpoint:
PUT /external/:campaignId/segments/:segmentId/targeting
Required Header:
Authorization: Bearer YOUR_API_TOKEN
Path Parameters:
campaignId(Number) – The campaign that owns the segmentsegmentId(Number) – The ID of the segment to update
Request Body Example:
{
"targeting": [
{
"code":"gender",
"values": ["Female"]
}
]
}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
}Validation Rules:
All fields must match allowed enums
Invalid combinations or unrecognized values will return a 400 error
Possible Errors:
400 –
invalid age group: Age value not supported400 –
invalid os: Must be "android" or "ios"404 –
not found: Campaign or segment not found403 –
unauthorized: You lack permission to update this segment