Skip to main content

Get Segments

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

Lior Avidar avatar
Written by Lior Avidar
Updated yesterday

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

limit

Number

Number of results to return

No

10

offset

Number

Result offset for pagination

No

0

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 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?