Endpoint:
PUT /external/campaigns/:campaignId/targeting
Required Header:
Authorization: Bearer YOUR_API_TOKEN
Path Parameter:
campaignId(Number) – The ID of the campaign to update
Request Body Example:
{
"targeting": [
{
"code": "age",
"values": [
"18-24",
"25-34"
]
},
{
"code": "gender",
"values": [
"male"
]
}
]
}Targeting Parameters:
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
Example Response:
{
"campaignId": 123456
}Validation Rules:
All values must match allowed enums
Invalid or unsupported combinations will return a
400error
Possible Errors:
400 –
invalid age group: Unsupported age values provided400 –
invalid os: Value must be either "android" or "ios"404 –
not found: Campaign ID does not exist403 –
unauthorized: Token is missing or lacks campaign scope