GET
/
v4
/
segments
List segments
curl --request GET \
  --url https://api.kit.com/v4/segments \
  --header 'X-Kit-Api-Key: <api-key>'
{
  "segments": [
    {
      "id": 1036,
      "name": "Segment B",
      "created_at": "2023-02-17T11:43:55Z"
    },
    {
      "id": 1035,
      "name": "Segment A",
      "created_at": "2023-02-17T11:43:55Z"
    }
  ],
  "pagination": {
    "has_previous_page": false,
    "has_next_page": false,
    "start_cursor": "WzEwMzZd",
    "end_cursor": "WzEwMzVd",
    "per_page": 500
  }
}

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Query Parameters

after
any

To fetch next page of results, use ?after=<end_cursor>

before
any

To fetch previous page of results, use ?before=<start_cursor>

include_total_count
boolean

To include the total count of records in the response, use true. For large collections, expect a slightly slower response.

per_page
any

Number of results per page. Default 500, maximum 1000.

Response

200
application/json

Returns a paginated list of all segments for your account

The response is of type object.