Skip to main content

Get Segments

Use this endpoint to retrieve all segments associated with a specific campaign.

L
Written by Lior Avidar
Updated over 2 months ago

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 ID

  • name: Segment name

  • bid: Default bid for this segment

  • status: Active or Inactive

  • created_at: Segment creation timestamp (ISO 8601)

  • updated_at: Last update timestamp (ISO 8601)


Possible Errors:

  • 403unauthorized: Invalid or expired token

  • 404not found: Campaign or segments not found

Did this answer your question?