> For the complete documentation index, see [llms.txt](https://partners.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partners.botpenguin.com/api-documentation/contact-and-chat-apis/getting-groups-segments.md).

# Getting Groups/Segments

### Get Segments/Groups

This API endpoint allows you to retrieve segments for your application.

**Endpoint URL:** `https://api-v7.express-chat.com/inbox/segments`

**HTTP Method:** GET

#### Request Headers

* `Authorization`: A bearer token is required for authentication. Replace `[MASKED_TOKEN]` with your valid API token. This token is used to authenticate and authorize the request.

#### Sample Request

```bash
curl 'https://api-v7.express-chat.com/inbox/segments' \
  -H 'Authorization: Bearer [MASKED_TOKEN]' \
  -H 'Content-Type: application/json' \
  -H 'authtype: Key' \
  --compressed
```

Replace `[MASKED_TOKEN]` in the request with your actual API token.

#### Response

The API will respond with a JSON object containing the segments available in your application. The response format may vary depending on the segments you have configured.

Please replace `[MASKED_TOKEN]` in the request with your actual API token for actual usage.

Here are the **response fields** for this API response:

| Field     | Type    | Description                                                                    |
| --------- | ------- | ------------------------------------------------------------------------------ |
| `success` | Boolean | Indicates whether the API request was successful.                              |
| `message` | String  | Additional information about the request. Empty if there’s nothing to display. |
| `data`    | Array   | Contains the response data. An empty array means no records were found.        |
| `code`    | Number  | HTTP status code of the response. `200` indicates success.                     |

**Meaning of this response:**\
The API call was successful, but there is currently no data available to return.

#### Example Response

```json
{
  "success": true,
  "message": "",
  "data": [],
  "code": 200
}
```

### :question: Got any questions?

If you have any questions, you can look into our repository of FAQs, most likely, you will find your answer here, If not, write us at <support@botpenguin.com>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://partners.botpenguin.com/api-documentation/contact-and-chat-apis/getting-groups-segments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
