GET
/
audiences
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.audiences.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "name": "Registered Users",
      "created_at": "2023-10-06T22:59:55.977Z"
    }
  ]
}

Query Parameters

Note that the limit parameter is optional. If you do not provide a limit, all audiences will be returned in a single response.
limit
number
Number of audiences to retrieve. Maximum is 100, and minimum is 1.
after
string
The ID after which we’ll retrieve more audiences (for pagination). This ID will not be included in the returned list.Cannot be used with the before parameter.
before
string
The ID before which we’ll retrieve more audiences (for pagination). This ID will not be included in the returned list.Cannot be used with the after parameter.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.audiences.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
      "name": "Registered Users",
      "created_at": "2023-10-06T22:59:55.977Z"
    }
  ]
}