List the domains of every site
/v1/site-domains Lists every domain connected to the account's sites, built-in addresses included, newest first. A token limited to some servers sees only the domains of the sites on those. Filter by siteId or status; sort by createdAt or hostname.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:read - View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
siteId | string Only the domains of this site. |
status | string Only domains with this status. One of: |
Example request
curl "https://api.rabbitflare.com/v1/site-domains?status=pending_dns" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/site-domains?status=pending_dns", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.siteDomains.list({ status: "pending_dns" })) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/site-domains?status=pending_dns');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/site-domains",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"status": "pending_dns",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of SiteDomain objects in data, with a Pagination object in pagination.
The SiteDomain object's fields 13 fields
| Field | Type and description |
|---|---|
id | string The domain's id. |
siteId | string The site it's connected to. |
serverId | string The site's server. |
hostname | string The domain, like shop.example.com. |
isPrimary | boolean Whether the site is served on this domain (the others redirect to it). |
isBuiltIn | boolean The address every site gets. It can't be removed. |
primaryOnVerify | boolean Still waiting for DNS, and becomes the primary domain once its DNS is verified. |
status | string
Known values: |
sslStatus | string The domain's SSL certificate: Known values: |
dnsTarget | string or null Point the domain's A record at this address (the server's IPv4). Null until the server has one. |
lastError | string or null Why the last DNS check or setup failed. Null otherwise. |
verifiedAt | string or null An ISO 8601 time, in UTC When its DNS was verified. Null until then. |
createdAt | string An ISO 8601 time, in UTC When the domain was added. |
Example response
{
"data": [
{
"id": "d5e6f7a8-b9c0-4d1e-8f2a-3b4c5d6e7f80",
"siteId": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"hostname": "www.example.com",
"isPrimary": false,
"isBuiltIn": false,
"primaryOnVerify": true,
"status": "pending_dns",
"sslStatus": "none",
"dnsTarget": "203.0.113.10",
"lastError": "DNS check failed: no A record was found",
"verifiedAt": null,
"createdAt": "2026-11-18T10:15:02.000Z"
}
],
"pagination": {
"limit": 25,
"hasMore": false,
"nextCursor": null
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |
400 invalid_ | The cursor isn't one this list gave, or was made with other filters or another sort. Start again from the first page, or keep the filters and sort the cursor was made with. |