Hanzo
OpenapiDomain

Buys a domain for your org and answers the ownership record together with the…

Buys a domain for your org and answers the ownership record together with the quote it was bought at.

POST /v1/domain/register

Addresshttps://api.hanzo.ai/v1/domain/register
MethodPOST
Operationpost_domain_register
AuthAuthorization: Bearer $HANZO_API_KEY

Buys a domain for your org and answers the ownership record together with the quote it was bought at.

The order of operations is the product guarantee: quote, refuse anything unpurchasable or unpriced, AUTHORIZE the org's prepaid balance, provision the authoritative zone in Hanzo DNS, register at the registrar already pointing at Hanzo's nameservers, and only then CAPTURE the charge and record ownership. A registrar failure therefore leaves the balance untouched — the org is never billed for a domain it did not get.

It requires a validated principal; that principal's org owns the domain and is the ledger the charge lands on. Re-buying a name the org already holds is 409, not a second purchase.

Refusals are distinct on purpose: 402 when the prepaid balance cannot cover the quoted price, 409 when the name is not available, 503 when the deployment has no registrar credentials, and the registrar's own message with its own 4xx — or 502 for its 5xx — when it rejects the purchase. Zone provisioning is best-effort: if the zone service is down the domain is still registered against Hanzo's nameservers and the zone reconciles afterwards, rather than the purchase failing.

Request

55 fields, body application/json (required).

FieldInTypeRequiredDescription
contactsbodyContacts
contacts.adminbodyRegistrant
contacts.admin.address1bodystringstreet address
contacts.admin.address2bodystringsecond address line
contacts.admin.citybodystringcity or locality
contacts.admin.companyNamebodystringthe organisation the contact acts for
contacts.admin.countrybodystringISO-3166 alpha-2, e.g.
contacts.admin.emailbodystringwhere WHOIS correspondence is sent
contacts.admin.faxbodystringfax number, in the same form as phone
contacts.admin.firstNamebodystringthe contact's given name
contacts.admin.lastNamebodystringthe contact's family name
contacts.admin.phonebodystring+NN.NNNNNNN
contacts.admin.statebodystringstate, province or region
contacts.admin.zipbodystringpostal code
contacts.billingbodyRegistrant
contacts.billing.address1bodystringstreet address
contacts.billing.address2bodystringsecond address line
contacts.billing.citybodystringcity or locality
contacts.billing.companyNamebodystringthe organisation the contact acts for
contacts.billing.countrybodystringISO-3166 alpha-2, e.g.
contacts.billing.emailbodystringwhere WHOIS correspondence is sent
contacts.billing.faxbodystringfax number, in the same form as phone
contacts.billing.firstNamebodystringthe contact's given name
contacts.billing.lastNamebodystringthe contact's family name
contacts.billing.phonebodystring+NN.NNNNNNN
contacts.billing.statebodystringstate, province or region
contacts.billing.zipbodystringpostal code
contacts.registrantbodyRegistrant
contacts.registrant.address1bodystringstreet address
contacts.registrant.address2bodystringsecond address line
contacts.registrant.citybodystringcity or locality
contacts.registrant.companyNamebodystringthe organisation the contact acts for
contacts.registrant.countrybodystringISO-3166 alpha-2, e.g.
contacts.registrant.emailbodystringwhere WHOIS correspondence is sent
contacts.registrant.faxbodystringfax number, in the same form as phone
contacts.registrant.firstNamebodystringthe contact's given name
contacts.registrant.lastNamebodystringthe contact's family name
contacts.registrant.phonebodystring+NN.NNNNNNN
contacts.registrant.statebodystringstate, province or region
contacts.registrant.zipbodystringpostal code
contacts.techbodyRegistrant
contacts.tech.address1bodystringstreet address
contacts.tech.address2bodystringsecond address line
contacts.tech.citybodystringcity or locality
contacts.tech.companyNamebodystringthe organisation the contact acts for
contacts.tech.countrybodystringISO-3166 alpha-2, e.g.
contacts.tech.emailbodystringwhere WHOIS correspondence is sent
contacts.tech.faxbodystringfax number, in the same form as phone
contacts.tech.firstNamebodystringthe contact's given name
contacts.tech.lastNamebodystringthe contact's family name
contacts.tech.phonebodystring+NN.NNNNNNN
contacts.tech.statebodystringstate, province or region
contacts.tech.zipbodystringpostal code
domainbodystringyesDomain is the name to buy.
yearsbodyintegerYears is the term to buy, defaulting to 1.

Response

StatusBodyMeaning
200RegisterResultok

200 body — 17 fields.

FieldInTypeAlwaysDescription
quotebodyOffer
quote.availablebodybooleanwhether it can be bought right now
quote.currencybodystringthe currency both prices are in
quote.domainbodystringthe name this quote prices
quote.premiumbodybooleanwhether the registry prices it above the standard rate
quote.priceCentsbodyintegersell (first-term registration)
quote.renewalPriceCentsbodyintegersell (renewal)
quote.tldbodystringthe top-level domain the name sits under
recordbodyHolding
record.costCentsbodyintegerwholesale cost
record.domainbodystringthe name owned
record.expiresAtbodystringwhen the registration lapses, RFC3339
record.nameserversbodystring[]the authoritative nameservers the name points at
record.orderbodyintegerregistrar order id
record.orgbodystringthe org that owns the domain
record.priceCentsbodyintegerwhat the customer paid (sell)
record.registeredAtbodyintegerunix seconds

Failure carries the platform error shape — see Errors.

Examples

hanzo domain register --domain <domain>

Domain API · All Hanzo APIs · Interactive reference

How is this guide?

On this page