# Audiences

The Audiences endpoint can be used to retrieve the full list of [audiences ](https://docs.mylinkconnect.com/broadcasts/audiences)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                                                                                         |
