Home//
REST API Reference
/- List all segments
List attached segments for contact
Retrieve a segment
Segment
List all segments
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.
Security
bearerAuth
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.
Example:include_count=true
Intercom-Versionstring(intercom_version)
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.
Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:2.17
- 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.17'Successful response
segmentsArray of objects(Segment)
A list of Segment objects
Response
{ "type": "segment.list", "segments": [ { … }, { … } ] }