Skip to main content

Update Campaign Targeting

Update campaign targeting settings such as age, gender, OS, and device type to refine your audience reach.

L
Written by Lior Avidar
Updated over a month ago

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

Required Header:
Authorization: Bearer YOUR_API_TOKEN


Path Parameter:

  • campaignId (Number) – The ID of the campaign to update


Request Body Example:

{
"data": {
"age": [18, 24, 35],
"gender": ["male", "female"],
"os": ["android"],
"device_type": ["phone", "tablet"],
"connection_type": ["wifi", "cellular"]
}
}

Targeting Parameters:

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

  • connection_type: "wifi" or "cellular"


Example Response:

{
"campaignId": 123456,
"updated": true
}

Validation Rules:

  • All values must match allowed enums

  • Invalid or unsupported combinations will return a 400 error


Possible Errors:

  • 400invalid age group: Unsupported age values provided

  • 400invalid os: Value must be either "android" or "ios"

  • 404not found: Campaign ID does not exist

  • 403unauthorized: Token is missing or lacks campaign scope

Did this answer your question?