# Audiences

The Audiences endpoint can be used to retrieve the full list of [audiences ](/broadcasts/audiences.md)associated with a bot. The audience id can then be used to stream conversation data based on its filter.

{% hint style="warning" %}
This endpoint is not mean to be used to continuously retrieve conversation exchange state in realtime by polling. Requests are throttled to a 30 minutes window.
{% endhint %}

### Request

The following request can be used to retrieve a bot audiences:

```bash
curl --location --request GET 'https://publicapi.xenioo.com/peoples/audiences/<MODE>' \
--header 'Authorization: Bearer <BOT_AUTH_TOKEN>' \
```

The mode parameter can have the following values

| Value             | Description                                                                            |
| ----------------- | -------------------------------------------------------------------------------------- |
| broadcast\_target | Will return only audiences created as broadcast targets.                               |
| custom\_filter    | Will extract only audiences created as custom filters inside the convesations section. |
| \*                | A wildcard value will extract all audiences, regardless of type.                       |

### Response

If the call is successful, a list of audiences will be returned.

```bash
[
    {
        "Id": "...",
        "Name": "My Audience",
        "Type": "broadcast_target"
    }
]
```

### Response Codes

This endpoint will reply with the following standard HTTP codes.

| Code | Meaning                                                                                                                                                     |
| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 200  | Ok. The request has been successfully fulfilled.                                                                                                            |
| 400  | Bad Request. The call does not contain the data required to be fulfilled or you attempted to access the same conversation during the 30 minutes throttling. |
| 401  | Unauthorized. The account associated to the token is not authorized                                                                                         |


---

# 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://docs.mylinkconnect.com/connect-api/globa-platform-api/conversations/audiences.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.
