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.

Written by Lior Avidar
Updated over 5 months ago

Endpoint:
PUT /external/: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:

{
"targeting": [
{
"code":"gender",
"values": ["Female"]
}
]
}

Targeting Fields:

age (string, optional)

  • Age range of the user

  • Possible values:

    • "13-17"

    • "18-24"

    • "25-34"

    • "35-54"

    • "55 +"

    • "Not Defined"

gender (string, optional)

  • Gender identification of the user

  • Possible values:

    • "Male"

    • "Female"

    • "Other"

    • "Not Defined"

city (string, optional)

  • Major metropolitan areas worldwide

  • Format: "City Name (Country Code)"

  • Examples: "Tokyo (JP)", "New York (US)", "London (GB)"

  • Covers 100+ major cities across all continents

dma (string, optional)

  • Designated Market Areas (US geographic media markets)

  • Format: "Market Name" or "City - Region"

  • Examples: "Atlanta", "New York", "Los Angeles"

  • Includes 200+ US television market regions as defined by Nielsen

state (string, optional)

  • States, provinces, and administrative regions globally

  • Format: "Region Name (Country Code)"

  • Examples: "California (US)", "Ontario (CA)", "Tokyo (JP)"

  • Comprehensive coverage of first-level administrative divisions worldwide

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:

  • 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?