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",
"capabilities": {
"sending": "enabled",
"receiving": "disabled"
}
}
]
}
Retrieve a list of domains for the authenticated user.
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",
"capabilities": {
"sending": "enabled",
"receiving": "disabled"
}
}
]
}
status types in the Domains
overview.limit parameter is optional. If you do not provide a limit, all domains will be returned in a single response.1001before parameter.after parameter.after or before parameter, not both. See our pagination guide for more information.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",
"capabilities": {
"sending": "enabled",
"receiving": "disabled"
}
}
]
}
Was this page helpful?