v1

latestOpenAPI 3.0.32026-07-14490228.1 KB

Get Segments

This endpoint retrieves all segments available to the client.

get/segments

Query parameters

pageinteger

The current page of results to retrieve.

per_pageinteger

The number of results to pull back. Allowed values: 25, 50, 100, -1 (for all).

sortstring

The order for record sorting. Allowed values are asc and desc.

orderstring

The field for sorting records. Allowed values: id, name, scope, type, length, status.

searchstring

A value to search the name field by for the request.

search_statusesstring[]

The statuses to filter by. Allowed values are active and inactive.

search_typesstring[]

The types to filter by. Allowed values are static and dynamic.

Response

200

Example response

{
  "data": [
    {
      "id": 1,
      "name": "Main Subscribers",
      "type": "static",
      "status": "active"
    }
  ],
  "meta": {
    "total": 1,
    "count": 1,
    "page": 1,
    "pages": 1,
    "per_page": 25,
    "order": "id",
    "sort": "DESC"
  }
}