Skip to content
Cloud
Docs

Domains API reference

Domain discovery, account-owned verified Domains, and project-owned exact Hostnames.

Published contracts: @socra/domain-api@0.0.5.

Base URL

https://domain.socra.cloud

Domain availability

Current registrar availability and premium pricing for candidate internet domains.

Domain pricing

Cached registrar pricing by TLD, action, and duration. Prices are estimates until checkout.

Quote domain pricing

POST/v1/domain-pricing/quote

Request body

tldsstring[]required
min items: 1 · max items: 50
action"register" | "renew" | "transfer" | "reactivate"required
durationintegerrequired
min: 1 · max: 10

Response

3 fields

dataobject[]required
tldstringrequired
min length: 2 · max length: 127 · pattern: ^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)*[a-z]{2,63}$
action"register" | "renew" | "transfer" | "reactivate"required
durationintegerrequired
greater than: 0 · max: 9007199254740991
duration_type"year"required
pricenumber | nullrequired
additional_costnumber | nullrequired
total_pricenumber | nullrequired
regular_pricenumber | nullrequired
your_pricenumber | nullrequired
promotion_pricenumber | nullrequired
currencystringrequired
min length: 3 · max length: 3
errorstring | nullrequired
fetched_atcustomrequired
expires_atcustomrequired

Domains

An account-owned DNS namespace proven by a DNS TXT challenge.

Create domain

POST/v1/domains

Request body

hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$

Response

8 fields

idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"required
verification_namestringrequired
verification_valuestringrequired
verified_atcustom | nullrequired
created_atcustomrequired
updated_atcustomrequired

List domains

GET/v1/domains

Query parameters

hostnamestringoptional
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"optional
limitintegeroptional
min: 1 · max: 100
afterstringoptional

Response

2 fields

dataobject[]required
idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"required
verification_namestringrequired
verification_valuestringrequired
verified_atcustom | nullrequired
created_atcustomrequired
updated_atcustomrequired
has_morebooleanrequired

Get domain

GET/v1/domains/{id}

Path parameters

idcustomrequired

Query parameters

No query parameters

Response

8 fields

idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"required
verification_namestringrequired
verification_valuestringrequired
verified_atcustom | nullrequired
created_atcustomrequired
updated_atcustomrequired

Update domain

PATCH/v1/domains/{id}

Path parameters

idcustomrequired

Request body

status"pending" | "disabled"required

Response

8 fields

idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"required
verification_namestringrequired
verification_valuestringrequired
verified_atcustom | nullrequired
created_atcustomrequired
updated_atcustomrequired

Verify domain DNS

POST/v1/domains/{id}/verify

Path parameters

idcustomrequired

Request body

No request body

Response

8 fields

idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"pending" | "verified" | "disabled"required
verification_namestringrequired
verification_valuestringrequired
verified_atcustom | nullrequired
created_atcustomrequired
updated_atcustomrequired

Delete domain

DELETE/v1/domains/{id}

Path parameters

idcustomrequired

Query parameters

No query parameters

Response

No response body

Hostnames

An exact globally unique hostname claimed by one project beneath a verified account Domain.

Claim hostname

POST/v1/hostnames

Request body

project_idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$

Response

8 fields

idcustomrequired
domain_idcustomrequired
project_idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"active" | "disabled"required
routing_targetstringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
created_atcustomrequired
updated_atcustomrequired

List hostnames

GET/v1/hostnames

Query parameters

project_idcustomrequired
hostnamestringoptional
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
domain_idcustomoptional
status"active" | "disabled"optional
limitintegeroptional
min: 1 · max: 100
afterstringoptional

Response

2 fields

dataobject[]required
idcustomrequired
domain_idcustomrequired
project_idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"active" | "disabled"required
routing_targetstringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
created_atcustomrequired
updated_atcustomrequired
has_morebooleanrequired

Get hostname

GET/v1/hostnames/{id}

Path parameters

idcustomrequired

Query parameters

No query parameters

Response

8 fields

idcustomrequired
domain_idcustomrequired
project_idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"active" | "disabled"required
routing_targetstringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
created_atcustomrequired
updated_atcustomrequired

Update hostname

PATCH/v1/hostnames/{id}

Path parameters

idcustomrequired

Request body

status"active" | "disabled"required

Response

8 fields

idcustomrequired
domain_idcustomrequired
project_idcustomrequired
hostnamestringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
status"active" | "disabled"required
routing_targetstringrequired
min length: 3 · max length: 253 · pattern: ^(?=.{3,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$
created_atcustomrequired
updated_atcustomrequired

Release hostname

DELETE/v1/hostnames/{id}

Path parameters

idcustomrequired

Query parameters

No query parameters

Response

No response body