> 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

## Récupérer les ID des segments

Renvoie la liste des segments de 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)                                     |
| -------------------------- | ------------------------------------------------------ |
| Authentification requise ? | Non si tcid n’est pas défini, token si tcid est défini |

#### Paramètres

| NOM                | OBLIGATOIRE    | VALEURS D’EXEMPLE                | DESCRIPTION                                        |
| ------------------ | -------------- | -------------------------------- | -------------------------------------------------- |
| site               | \d+            | 1234                             | ID du site dont vous souhaitez obtenir les détails |
| tcid (facultatif)  | \d+            | 1234                             | ID du tcid (si le cookie est désactivé)            |
| token (facultatif) | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Jeton de sécurité (si tcid est défini)             |
| callback           | \w+            | do\_something                    | Méthode de rappel 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>

#### Exemple de résultat <a href="#example-result" id="example-result"></a>

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

## Récupérer la liste des segments

Renvoie la liste des segments créés dans l’interface 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        |
| -------------------------- | ----------- |
| Authentification requise ? | Oui (token) |

#### Paramètres

| NOM   | OBLIGATOIRE    | VALEURS D’EXEMPLE                | DESCRIPTION                                        |
| ----- | -------------- | -------------------------------- | -------------------------------------------------- |
| site  | d+             | 1234                             | ID du site dont vous souhaitez obtenir les détails |
| 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>

#### Exemple de résultat <a href="#example-result" id="example-result"></a>

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


---

# 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.
