List domains

List the workspace’s custom domains with their verification status, the domain limit, and how much of it is used.

GET https://sitepaste.com/api/v1/public/domains

Requires the settings scope.

Usage

curl "https://sitepaste.com/api/v1/public/domains" \
  -H "Authorization: Bearer $TOKEN"

Authorizations

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token (Authorization: Bearer sp_...). Created in the dashboard under Account > Tokens. See authentication.

Query parameters

The list is returned whole. It takes no limit or offset, and sending either answers 422.

Response

{
  "domains": [
    {
      "id": "d3kplm9nqrst",
      "siteId": "s7k2m0dq1p3z",
      "domain": "docs.example.com",
      "status": "active",
      "instructions": "Add a CNAME record for 'docs' pointing to cname.sitepaste.com",
      "cnameTarget": "cname.sitepaste.com",
      "isApex": false,
      "isPrimary": true,
      "createdAt": "2026-08-30T12:00:00Z"
    }
  ],
  "cnameTarget": "cname.sitepaste.com",
  "limit": 1,
  "used": 1
}

domains is always an array, empty when the workspace has none. Each entry is the domain object that every domain route answers with:

FieldTypeDescription
idstringThe domain’s ID, for the per-domain routes.
siteIdstringThe site the domain points at. Its name is on GET /sites.
domainstringThe hostname.
statusstringpending_verification, pending, active, or failed.
errorstringWhat is holding the domain up. Omitted when nothing is.
verificationobjectThe ownership TXT record (type, name, value). Present only while status is pending_verification.
instructionsstringProse DNS setup instructions for this domain.
cnameTargetstringThe value to point the domain’s CNAME (or ALIAS) record at.
isApexbooleanWhether this is an apex domain (added together with its www. pair).
isPrimarybooleanWhether this is the primary half of an apex/www pair.
createdAtstringRFC 3339.

The list envelope around it:

FieldTypeDescription
domainsarrayEach domain, as above.
cnameTargetstringThe value to point your CNAME record at.
limitnumberHow many domains the plan and any domain packs allow.
usednumberHow many domains the workspace has today. An apex domain and its www. pair count once.

POST /domains succeeds while used is below limit, and answers 402 once it reaches limit.