Skip to content
Check out our new developer portal and join the Braze developer community!

Segment list endpoint

get

/segments/list

This endpoint allows you to export a list of segments, each of which will include its name, Segment API Identifier, and whether it has analytics tracking enabled. The segments are returned in groups of 100 sorted by time of creation (oldest to newest by default). Archived segments are not included.

Rate limit

We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in API rate limits.

Request parameters

Parameter Required Data Type Description
page Optional Integer The page of segments to return, defaults to 0 (returns the first set of up to 100).
sort_direction Optional String - Sort creation time from newest to oldest: pass in the value desc.
- Sort creation time from oldest to newest: pass in the value asc.

If sort_direction is not included, the default order is oldest to newest.

Example request

1
2
curl --location --request GET 'https://rest.iad-01.braze.com/segments/list?page=1&sort_direction=desc' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
    "message": (required, string) the status of the export, returns 'success' when completed without errors,
    "segments" : [
        {
            "id" : (string) Segment API Identifier,
            "name" : (string) segment name,
            "analytics_tracking_enabled" : (boolean) whether the segment has analytics tracking enabled,
            "tags" : (array) tag names associated with the segment
        },
        ...
    ]
}
WAS THIS PAGE HELPFUL?
New Stuff!