Segments allow you to define and control unique targeting and bidding strategies within a single campaign.
Endpoint:
GET /external/v1/campaigns/: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
Example Request:
GET /external/v1/campaigns/123456/segments
Example Response:
{
"data": [
{
"id": 9876,
"name": "High Value Users",
"bid": 3.5,
"status": "Active",
"created_at": "2024-04-01T12:00:00Z",
"updated_at": "2024-05-03T14:15:00Z"
}
]
}
Returned Fields:
id
: Segment IDname
: Segment namebid
: Default bid for this segmentstatus
:Active
orInactive
created_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