Skip to content
Start here

List domains

client.registrar.domains.list(DomainListParams { account_id } params, RequestOptionsoptions?): SinglePage<Domain { id, available, can_register, 9 more } >
GET/accounts/{account_id}/registrar/domains

List domains handled by Registrar.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params: DomainListParams { account_id }
account_id: string

Identifier

maxLength32
ReturnsExpand Collapse
Domain { id, available, can_register, 9 more }
id?: string

Domain identifier.

maxLength32
available?: boolean

Shows if a domain is available for transferring into Cloudflare Registrar.

can_register?: boolean

Indicates if the domain can be registered as a new domain.

created_at?: string

Shows time of creation.

formatdate-time
current_registrar?: string

Shows name of current registrar.

expires_at?: string

Shows when domain name registration expires.

formatdate-time
locked?: boolean

Shows whether a registrar lock is in place for a domain.

registrant_contact?: RegistrantContact { address, city, country, 10 more }

Shows contact information for domain registrant.

address: string

Address.

city: string

City.

country: string | null

The country in which the user lives.

maxLength30
first_name: string | null

User's first name

maxLength60
last_name: string | null

User's last name

maxLength60
organization: string

Name of organization.

phone: string | null

User's telephone number

maxLength20
state: string

State.

zip: string | null

The zipcode or postal code where the user lives.

maxLength20
id?: string

Contact Identifier.

maxLength32
address2?: string

Optional address line for unit, floor, suite, etc.

email?: string

The contact email address of the user.

maxLength90
fax?: string

Contact fax number.

registry_statuses?: string

A comma-separated list of registry status codes. A full list of status codes can be found at EPP Status Codes.

supported_tld?: boolean

Whether a particular TLD is currently supported by Cloudflare Registrar. Refer to TLD Policies for a list of supported TLDs.

transfer_in?: TransferIn { accept_foa, approve_transfer, can_cancel_transfer, 3 more }

Statuses for domain transfers into Cloudflare Registrar.

accept_foa?: "needed" | "ok"

Form of authorization has been accepted by the registrant.

One of the following:
"needed"
"ok"
approve_transfer?: "needed" | "ok" | "pending" | 3 more

Shows transfer status with the registry.

One of the following:
"needed"
"ok"
"pending"
"trying"
"rejected"
"unknown"
can_cancel_transfer?: boolean

Indicates if cancellation is still possible.

disable_privacy?: "needed" | "ok" | "unknown"

Privacy guards are disabled at the foreign registrar.

One of the following:
"needed"
"ok"
"unknown"
enter_auth_code?: "needed" | "ok" | "pending" | 2 more

Auth code has been entered and verified.

One of the following:
"needed"
"ok"
"pending"
"trying"
"rejected"
unlock_domain?: "needed" | "ok" | "pending" | 2 more

Domain is unlocked at the foreign registrar.

One of the following:
"needed"
"ok"
"pending"
"trying"
"unknown"
updated_at?: string

Last updated.

formatdate-time

List domains

import Cloudflare from 'cloudflare';

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

// Automatically fetches more pages as needed.
for await (const domain of client.registrar.domains.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(domain.id);
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "ea95132c15732412d22c1476fa83f27a",
      "available": false,
      "can_register": false,
      "created_at": "2018-08-28T17:26:26Z",
      "current_registrar": "Cloudflare",
      "expires_at": "2019-08-28T23:59:59Z",
      "locked": false,
      "registrant_contact": {
        "address": "123 Sesame St.",
        "city": "Austin",
        "country": "US",
        "first_name": "John",
        "last_name": "Appleseed",
        "organization": "Cloudflare, Inc.",
        "phone": "+1 123-123-1234",
        "state": "TX",
        "zip": "12345",
        "id": "ea95132c15732412d22c1476fa83f27a",
        "address2": "Suite 430",
        "email": "user@example.com",
        "fax": "123-867-5309"
      },
      "registry_statuses": "ok,serverTransferProhibited",
      "supported_tld": true,
      "transfer_in": {
        "accept_foa": "needed",
        "approve_transfer": "unknown",
        "can_cancel_transfer": true,
        "disable_privacy": "ok",
        "enter_auth_code": "needed",
        "unlock_domain": "ok"
      },
      "updated_at": "2018-08-28T17:26:26Z"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "ea95132c15732412d22c1476fa83f27a",
      "available": false,
      "can_register": false,
      "created_at": "2018-08-28T17:26:26Z",
      "current_registrar": "Cloudflare",
      "expires_at": "2019-08-28T23:59:59Z",
      "locked": false,
      "registrant_contact": {
        "address": "123 Sesame St.",
        "city": "Austin",
        "country": "US",
        "first_name": "John",
        "last_name": "Appleseed",
        "organization": "Cloudflare, Inc.",
        "phone": "+1 123-123-1234",
        "state": "TX",
        "zip": "12345",
        "id": "ea95132c15732412d22c1476fa83f27a",
        "address2": "Suite 430",
        "email": "user@example.com",
        "fax": "123-867-5309"
      },
      "registry_statuses": "ok,serverTransferProhibited",
      "supported_tld": true,
      "transfer_in": {
        "accept_foa": "needed",
        "approve_transfer": "unknown",
        "can_cancel_transfer": true,
        "disable_privacy": "ok",
        "enter_auth_code": "needed",
        "unlock_domain": "ok"
      },
      "updated_at": "2018-08-28T17:26:26Z"
    }
  ],
  "success": true,
  "result_info": {
    "count": 1,
    "page": 1,
    "per_page": 20,
    "total_count": 2000
  }
}