Skip to content

List all segments

Request

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
Query
include_countboolean

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
typestring

Pass company to list company segments. Any other value, or no value, lists contact segments.

Example:type=company
Headers
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
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'

Responses

Successful response

Bodyapplication/json
typestring

The type of the object

Value:"segment.list"
Example:"segment.list"
segmentsArray of objects(Segment)

A list of Segment objects

Response
{ "type": "segment.list", "segments": [ { … }, { … } ] }