# Segments

## GET segments list

Returns the list of segments created in Engage UIX

#### Resource URL <a href="#resource-url" id="resource-url"></a>

<https://api.commander1.com/api/dms/segmentation/segments/list>

#### Resource Information <a href="#resource-information" id="resource-information"></a>

| Response formats         | JSON        |
| ------------------------ | ----------- |
| Requires authentication? | Yes (token) |

#### Parameters

| NAME  | REQUIREMENT    | EXAMPLE VALUES                   | DESCRIPTION                        |
| ----- | -------------- | -------------------------------- | ---------------------------------- |
| site  | d+             | 1234                             | Id of the site to query detail for |
| token | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Security token                     |

#### Example Request <a href="#example-request" id="example-request"></a>

`GET`

<https://api.commander1.com/api/dms/segmentation/segments/list?site=1234\\&token=WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA>

#### Example Result <a href="#example-result" id="example-result"></a>

```
[{"id":"BBFAC450","label":"VIP prospect"},{"id":"3DCC6A0A","label":"New customer"}]
```

## GET segments IDs

Returns the list of segments for the user

#### Resource URL <a href="#resource-url" id="resource-url"></a>

<https://api.commander1.com/api/dms/segmentation/segments>

#### Resource Information <a href="#resource-information" id="resource-information"></a>

| Response formats         | javascript (JSONP)                          |
| ------------------------ | ------------------------------------------- |
| Requires authentication? | No if tcid is not set, token if tcid is set |

#### Parameters

| NAME             | REQUIREMENT    | EXAMPLE VALUES                   | DESCRIPTION                           |
| ---------------- | -------------- | -------------------------------- | ------------------------------------- |
| site             | \d+            | 1234                             | Id of the site to query detail for    |
| tcid (optional)  | \d+            | 1234                             | Id of the tcid (if cookie is disable) |
| token (optional) | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Security token (if tcid is set)       |
| callback         | \w+            | do\_something                    | javascript callback method for JSONP  |

#### Example Request <a href="#example-request" id="example-request"></a>

`GET`

<https://api.commander1.com/api/dms/segmentation/segments?site=1234\\&callback=tC\\_funcEngage>

#### Example Result <a href="#example-result" id="example-result"></a>

```
/**/tC_funcEngage(["F92C4F26"]);
```


---

# Agent Instructions: 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:

```
GET https://community.commandersact.com/datacommander/api/segments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
