# Audience Contacts

The Audience Contacts endpoint can be used to retrieve all of the contacts that are part of an [Audience](/broadcasts/audiences.md) filter. Since audience filters can generate a considerable amount of contacts, the call is meant to be executed in a start and next fashion.

### Request

The following request can be used to start the retrieval of audience contacts:

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

The ID field can be retrieved from the results of the [Audiences List API](/connect-api/globa-platform-api/conversations/audiences.md). &#x20;

The FIELDS parameters is, instead, a comma separated list of all of the fields that should be returned for each contact. Field names are identical to the variable names you can see from the [Variables Panel](/conversations/filtering.md) of a conversation.

After the first request completes successfully, you can follow up each subsequent request using the following syntax:

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

Each request (start one included) will advance the read cursor by 256 contacts. Executing again the start request will reset the cursor position to the first contact.

Executing a next request after the last record will result in a Bad Request error response.

### Response

If the call is successful, a list of contacts will be returned. The content of the list may vary, depending on the FIELDS specified in the initial call.

### 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. |
| 404  | Not Found. The specified audience could not be found.                     |
| 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/audience-contacts.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.
