> For the complete documentation index, see [llms.txt](https://doc.commandersact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/data-api/segment-api.md).

# API segment

## GET des IDs des segments

Renvoie la liste des segments pour l'utilisateur

#### URL de la ressource <a href="#resource-url" id="resource-url"></a>

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

#### Informations sur la ressource <a href="#resource-information" id="resource-information"></a>

| Formats de réponse               | javascript (JSONP)                                     |
| -------------------------------- | ------------------------------------------------------ |
| Nécessite une authentification ? | Non si tcid n'est pas défini, token si tcid est défini |

#### Paramètres

| NOM                | EXIGENCE       | VALEURS D'EXEMPLE                | DESCRIPTION                                 |
| ------------------ | -------------- | -------------------------------- | ------------------------------------------- |
| site               | \d+            | 1234                             | ID du site pour lequel interroger le détail |
| tcid (facultatif)  | \d+            | 1234                             | ID du tcid (si cookie est désactivé)        |
| token (facultatif) | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | token de sécurité (si tcid est défini)      |
| callback           | \w+            | do\_something                    | méthode de callback javascript pour JSONP   |

#### Exemple de requête <a href="#example-request" id="example-request"></a>

`GET`

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

#### Résultat d'exemple <a href="#example-result" id="example-result"></a>

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

## GET de la liste des segments

Renvoie la liste des segments créés dans Engage UIX

#### URL de la ressource <a href="#resource-url" id="resource-url"></a>

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

#### Informations sur la ressource <a href="#resource-information" id="resource-information"></a>

| Formats de réponse               | JSON        |
| -------------------------------- | ----------- |
| Nécessite une authentification ? | Oui (token) |

#### Paramètres

| NOM   | EXIGENCE       | VALEURS D'EXEMPLE                | DESCRIPTION                                 |
| ----- | -------------- | -------------------------------- | ------------------------------------------- |
| site  | d+             | 1234                             | ID du site pour lequel interroger le détail |
| token | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Jeton de sécurité                           |

#### Exemple de requête <a href="#example-request" id="example-request"></a>

`GET`

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

#### Résultat d'exemple <a href="#example-result" id="example-result"></a>

```
[{"id":"BBFAC450","label":"prospect VIP"},{"id":"3DCC6A0A","label":"nouveau client"}]
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.commandersact.com/fr/developpeurs/tracking-and-integrations/tracking/data-api/segment-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
