# List all segments

You can fetch a list of all segments.

Endpoint: GET /segments
Version: 2.13
Security: bearerAuth

## Query parameters:

  - `include_count` (boolean)
    It includes the count of contacts that belong to each segment.

## Header parameters:

  - `Intercom-Version` (string)

## Response 200 fields (application/json):

  - `type` (string)
    The type of the object
    Enum: "segment.list"

  - `segments` (array)
    A list of Segment objects

  - `segments.type` (string)
    The type of object.
    Enum: "segment"

  - `segments.id` (string)
    The unique identifier representing the segment.
    Example: 56203d253cba154d39010062

  - `segments.name` (string)
    The name of the segment.
    Example: Active

  - `segments.created_at` (integer)
    The time the segment was created.
    Example: 1394621988

  - `segments.updated_at` (integer)
    The time the segment was updated.
    Example: 1394622004

  - `segments.person_type` (string)
    Type of the contact: contact (lead) or user.
    Enum: "contact", "user"

  - `segments.count` (integer)
    The number of items in the user segment. It's returned when `include_count=true` is included in the request.
    Example: 3

  - `pages` (object)
    A pagination object, which may be empty, indicating no further pages to fetch.

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

  - `errors.field` (string)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: email

