List customers in a segment
Returns customers in a segment. This endpoint returns an array of identifiers; each object in the array represents a person and contains the identifier values allowed in your workspace. In general, we recommend that you use identifiers rather than ids to find people, because it provides more information.
If your workspace does not use email as a unique identifier for people, identifiers does not contain email values. Go to your Workspace Settings to find out which identifiers your workspace supports.
The ids array only lists ID values for people in a segment; if your workspace uses both email and id as identifiers, it's possible that a member of your segment does not have an id value, resulting in an empty string in the ids array.
- Type: integerFormat: int32segment
_id requiredThe identifier for a segment. You can find your segment's ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API.
- Type: stringstart
The token for the page of results you want to return. Responses contain a
nextproperty. Use this property as thestartvalue to return the next page of results. - Type: integerlimitmax:30000
The maximum number of results you want to retrieve per page.
- application/json
- 404
The
segment_iddoes not exist. - 429
Your request is over the 10-per-second limit.
curl 'https://api.customer.io/v1/segments/1/membership?start=&limit=1000' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"segment_id": 7,
"ids": [
"string"
],
"identifiers": [
{
"email": "test@example.com",
"id": 2,
"cio_id": "a3000001"
}
],
"next": "string"
}Returns an array of customers for a segment.