You can fetch a list of all segments.
Segment names are returned HTML-escaped, for example & as &.
Requires the read_users_companies or write_users_companies OAuth scope.
Includes the count of contacts that belong to each segment. The counts are added whenever this parameter has a value in the query string, even false or an empty one, so omit it entirely to leave them out. A bare include_count with no = adds no counts. With type=company, a company segment gets no count unless a contact segment has the same name, and then it shows that contact segment's count.
Intercom API version.
If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.
- The production API serverhttps://api.intercom.io/segments
- The european API serverhttps://api.eu.intercom.io/segments
- The australian API serverhttps://api.au.intercom.io/segments
curl -i -X GET \
'https://api.intercom.io/segments?include_count=true&type=company' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Intercom-Version: 2.18'Successful response
This will return a list of Segment Objects. The list is not paginated.
A list of Segment objects
{ "type": "segment.list", "segments": [ { … }, { … } ] }