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

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "name": "example.com",
      "status": "not_started",
      "created_at": "2023-04-26T20:21:26.347412+00:00",
      "region": "us-east-1"
    }
  ]
}
See all available status types in the Domains overview.

Query Parameters

Note that the limit parameter is optional. If you do not provide a limit, all domains will be returned in a single response.
limit
number
Number of domains to retrieve. Maximum is 100, and minimum is 1.
after
string
The ID after which we’ll retrieve more domains (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 domains (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.domains.list();
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "d91cd9bd-1176-453e-8fc1-35364d380206",
      "name": "example.com",
      "status": "not_started",
      "created_at": "2023-04-26T20:21:26.347412+00:00",
      "region": "us-east-1"
    }
  ]
}