# GET /{environment}/targeting/audiences

> Current Froomle documentation · [View canonical page](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html)

<a id="_description"></a>

## Description

Returns an audience previously requested through the `/targeting/audiences/requests` endpoint. Can be used to paginate through large result sets. Note that audiences are only stored for a limited amount of time.

<a id="_parameters"></a>

## Parameters

| Type | Name | Description | Schema |
| --- | --- | --- | --- |
| **Path** | **environment**<br>_required_ | The environment for which a request is made. | string |
| **Query** | **audience\_id**<br>_required_ | Unique identifier of the request. | string |
| **Query** | **limit**<br>_required_ | The number of users to fetch. | integer |
| **Query** | **offset**<br>_required_ | The rank of the first user to be requested. Starts counting at 1. | integer |

<a id="_responses"></a>

## Responses

| HTTP Code | Description | Schema |
| --- | --- | --- |
| **200** | Audience was found and returned successfully. | [AudiencesResponse](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html#_audiencesresponse) |
| **400** | Request is malformed or contains invalid values. | [ErrorBody](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html#_errorbody) |
| **401** | Not authorized to make an audience targeting request. | [ErrorBody](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html#_errorbody) |

<a id="_produces"></a>

## Produces

-   `application/json`
    

<a id="_example_http_response"></a>

## Example HTTP response

<a id="_response_200"></a>

### Response 200

```json
{
  "audience" : {
    "audience_id" : "dhoghesjwgotuy39",
    "users" : [ {
      "id" : "user_1",
      "user_type" : "login"
    }, {
      "id" : "user_2",
      "user_type" : "login"
    }, {
      "id" : "user_3",
      "user_type" : "login"
    } ]
  }
}
```

* * *

<a id="_audiencetargetingresponse"></a>

### AudienceTargetingResponse

Response containing an audience for a promotion.

| Name | Description | Schema |
| --- | --- | --- |
| **audience**<br>_required_ | Audience object in response. | [audience](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html#_audiencetargetingresponse_audience) |

**audience**

| Name | Description | Schema |
| --- | --- | --- |
| **audience\_id**<br>_required_ | A unique identifier for the audience request which is to be supplied with each logged event. | string |
| **audience\_name**<br>_required_ | Name of the audience, to be passed in tracking events later. | string |
| **audience\_size**<br>_required_ | Total size of the audience requested. Use limit for pagination. | integer |
| **integration\_type**<br>_required_ | Name of the type of integration. | string |
| **limit**<br>_required_ | Number of Users to be returned | integer |
| **users**<br>_required_ | List containing User-objects. | < [User](https://docs.froomle.com/froomle-doc-main/v2/api_reference/audience/operations/get_audience_from_cache.html#_user) > array |

<a id="_user"></a>

### User

A User object.

| Name | Description | Schema |
| --- | --- | --- |
| **id**<br>_required_ | Unique identifier of the user. | string |
| **user\_type**<br>_required_ | Type of user identifier. Currently one of user\_id or device\_id. | string |

<a id="_errorbody"></a>

### ErrorBody

Error message.

| Name | Description | Schema |
| --- | --- | --- |
| **detail**<br>_optional_ | Detailed description of the error. | string |
| **status**<br>_optional_ | Status-code for the error. | integer |
| **title**<br>_optional_ | Name of the error. | string |
| **type**<br>_optional_ | Type of the exception thrown. | string |
