Skip to main content
GET
/
audiences
/
{audience_id}
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const audience = await client.audiences.retrieve('audience_id');

console.log(audience.id);
{
  "id": "aud_01H8M...",
  "name": "Example Name",
  "description": "An example description.",
  "operator": "AND",
  "filter": {
    "filters": [
      {
        "operator": "string",
        "path": "string",
        "value": "string",
        "filters": [
          {
            "operator": "string"
          }
        ]
      }
    ]
  },
  "created_at": "2024-01-15T10:30:00.000Z",
  "updated_at": "2024-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

audience_id
string
required

A unique identifier representing the audience_id

Response

200 - application/json
id
string
required

A unique identifier representing the audience_id

name
string
required

The name of the audience

description
string
required

A description of the audience

created_at
string
required
updated_at
string
required
operator
enum<string>

The logical operator (AND/OR) for the top-level filter

Available options:
AND,
OR
filter
AudienceFilterConfig · object | null

Filter configuration for audience membership containing an array of filter rules