Segments allow you to define and control unique targeting and bidding strategies within a single campaign.
Endpoint:
GET /external/:campaignId/segments
Required Header:
Authorization: Bearer YOUR_API_TOKEN
Path Parameter:
campaignId(Number) – The ID of the campaign for which you want to retrieve segments
Query Parameters
Parameter | Type | Description | Required | Default |
| Number | Number of results to return | No |
|
| Number | Result offset for pagination | No |
|
Example Request:
GET /external/12345/segments
Example Response:
{
"data": [
{
"id": 12345,
"name": "my segment",
"bid": 1.1,
"countries": ["US"]
}
],
"totalResultsCount": 2,
"limit": 1,
"offset": 0
}
Returned Fields:
id: Segment IDname: Segment namebid: Default bid for this segmentstatus:ActiveorInactivecreated_at: Segment creation timestamp (ISO 8601)updated_at: Last update timestamp (ISO 8601)
Possible Errors:
403 –
unauthorized: Invalid or expired token404 –
not found: Campaign or segments not found