List Segments
Get the segments of a list. The response contains only metadata. It includes advanced segments and read-only segments that other Mailchimp tools made, for example Google Analytics segments and segments from the AI segment builder. The read_only property of each segment shows if you can update it.
Request
- Base URLhttps://api.mailchimp.com
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://login.mailchimp.com/oauth2/authorizeToken URLhttps://login.mailchimp.com/oauth2/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
The number of segments to return. The default is 10. Use a whole number from 1 to 1000. If you use a different value, the API returns a 400 error. The API does not change the value.
To get the next page of segments, set cursor to the next_cursor value from the previous response. Do not make or change a cursor value. If you do, pagination can stop without notice. To get the first page, do not include cursor. If a response does not contain next_cursor, there are no more pages. If segments are created or deleted while you get the pages, the response can skip or repeat a segment.
The unique ID of the list to get segments from.
The field to sort the segments by.
The sort direction. The default is DESC. Use ASC or DESC. The value is not case-sensitive. If you use a different value, the API returns a 400 error.
Response
Example response
{
"segments": [
{
"created_at": "2025-01-15T10:30:00+00:00",
"id": "0dbaba26-0003-8000-8000-000000000919",
"list_id": "a1b2c3d4e5",
"name": "Example Segment"
}
],
"total_items": 12
}Changes
No recorded changes to this operation across all 1 revision of this API.