Skip to content
Coritan Docs

Organization API: Customer Portal: Domains

The 15 Organization API operations for domains.

View as Markdown

Part of Customer Portal.

Method Path Summary
POST /api/v1/orgs/{org_slug}/portal/domains/register Register a domain name for duration years (1 to 10), paid from the customer's wallet
GET /api/v1/orgs/{org_slug}/portal/domains/registrations The customer's domain registrations, newest first, with total for the same filters
GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id} One of the customer's registrations, whatever its status
POST /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/auth-code The transfer code (EPP code) that moves the domain to another registrar
PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/auto-renew Turn auto-renew on or off
PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/lock Lock the domain against a transfer away, or unlock it
PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/nameservers Replace the domain's nameservers (2 to 13 host names) at the registry
GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/registrant The domain's registrant contact as we hold it, whatever the registration's status
PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/registrant Replace the domain's registrant contact and send it to the registry
POST /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/renew Renew a registration at the registry for duration years (1 to 10), paid from the wallet
GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/renewal The price of a year of renewal, which POST .../renew charges times its duration
PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/whois-privacy Turn WHOIS privacy on or off at the registry
POST /api/v1/orgs/{org_slug}/portal/domains/search Check whether a domain name is free to register and what a year costs
POST /api/v1/orgs/{org_slug}/portal/domains/transfer Start moving a domain here from another registrar, paid from the customer's wallet
POST /api/v1/orgs/{org_slug}/portal/domains/transfer/quote What POST portal/domains/transfer charges for domain

Register a domain name for duration years (1 to 10), paid from the customer's wallet

Section titled Register a domain name for duration years (1 to 10), paid from the customer's wallet

POST /api/v1/orgs/{org_slug}/portal/domains/register

Register a domain name for duration years (1 to 10), paid from the customer's wallet.

The charge is the price that POST portal/domains/search shows for the first year, plus its renew_price for each year after it. A premium name costs price every year. A wallet that does not cover it answers 402 before anything is taken, with detail set to {"error": "insufficient_credit", "message", "required", "available", "currency"}; the two amounts are strings with two decimals.

The charge is committed before we ask the registrar. When the registrar refuses, or does not answer, we give the charge back and answer 502. When we cannot reach a registrar at all the answer is 503 with the detail "Domain registration is not available right now.", and nothing stays charged.

Without nameservers (2 to 13 host names) the domain uses ours. A domain with one of our nameservers gets a DNS zone that is the customer's: their own zone of that name, or a new one. When another account already holds a zone of the name, the order answers 409 before anything is charged, because our nameservers would answer for the new domain from that zone. A zone the service refuses for another reason leaves the registration standing, and the answer then sets dns_zone_conflict with a dns_zone_message for the customer.

The registration's row is written, as pending_registration, in the transaction that takes the charge. The table holds one row for a name, so a second order for it answers 409 with nothing taken. A refusal by the registrar removes the row and gives the charge back.

registrant is optional and takes the fields of PUT .../registrant, checked the same way (422 with one entry per field under registrant). We create it at the registry before any money moves, and a refusal answers 502. Without it, the registrar's default contact is the registrant. whois_privacy is on unless the order turns it off.

A name that is taken, or already registered here, answers 409. The answer is the registration with charged, currency and balance (what the wallet holds now). Rate limited as org_domains.register and written to the audit log as domain.registered, or domain.register_refunded when the charge went back.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
domain string yes
duration integer no
whois_privacy boolean no
nameservers array of string or null no
registrant RegistrantBody or null no
registrant.name string or null no
registrant.organization string or null no
registrant.email string or null no
registrant.phone string or null no
registrant.address_line1 string or null no
registrant.address_line2 string or null no
registrant.city string or null no
registrant.region string or null no
registrant.postcode string or null no
registrant.country string or null no
registrant.country_name string or null no
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

Fields of a 201 response:

Field Type
id integer
domain string
status string
registered_at string (date-time) or null
expires_at string (date-time) or null
nameservers array of string
uses_our_dns boolean
whois_privacy boolean
locked boolean
auto_renew boolean
dns_zone_id integer or null
dns_zone_conflict boolean
dns_zone_message string or null
charged string
currency string
balance string

The customer's domain registrations, newest first, with total for the same filters

Section titled The customer's domain registrations, newest first, with total for the same filters

GET /api/v1/orgs/{org_slug}/portal/domains/registrations

The customer's domain registrations, newest first, with total for the same filters.

status matches one status exactly and domain one name exactly. An unknown status answers 422 with a detail that names the allowed words. Registrations of another customer, of another organization and of platform accounts are never listed.

uses_our_dns is true when one of the domain's nameservers is ours. dns_zone_conflict and dns_zone_message are set only by the answers that link a zone (register and nameservers), so here they are false and null.

Name In Type Required Description
org_slug path string yes
page query integer no The page to answer, from 1 Default: 1.
per_page query integer no Registrations a page, 1 to 100 Default: 25.
status query string or null no Only registrations in this status: pending_registration, active, expiring_soon, expired, redemption, transferred_out, pending_transfer, terminated. Any other word answers 422.
domain query string or null no Only the registration of this exact domain name. Case does not matter.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
registrations array of OrgDomainRegistration
registrations[].id integer
registrations[].domain string
registrations[].status string
registrations[].registered_at string (date-time) or null
registrations[].expires_at string (date-time) or null
registrations[].nameservers array of string
registrations[].uses_our_dns boolean
registrations[].whois_privacy boolean
registrations[].locked boolean
registrations[].auto_renew boolean
registrations[].dns_zone_id integer or null
registrations[].dns_zone_conflict boolean
registrations[].dns_zone_message string or null
total integer

One of the customer's registrations, whatever its status

Section titled One of the customer's registrations, whatever its status

GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}

One of the customer's registrations, whatever its status. Anything else answers 404.

Name In Type Required
reg_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
id integer
domain string
status string
registered_at string (date-time) or null
expires_at string (date-time) or null
nameservers array of string
uses_our_dns boolean
whois_privacy boolean
locked boolean
auto_renew boolean
dns_zone_id integer or null
dns_zone_conflict boolean
dns_zone_message string or null

The transfer code (EPP code) that moves the domain to another registrar

Section titled The transfer code (EPP code) that moves the domain to another registrar

POST /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/auth-code

The transfer code (EPP code) that moves the domain to another registrar.

A POST with no body, so a read-only support session cannot read the code. Answers 409 while the domain is locked: unlock it with PUT .../lock first. Answers 404 for a registration that is not the customer's, 409 for one that is not active or expiring_soon, and 502 when the registry gives no code. Rate limited as org_domains.auth_code. Each read is written to the audit log as domain.auth_code_read, without the code.

Name In Type Required
reg_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
auth_code string

PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/auto-renew

Turn auto-renew on or off.

While it is on, the daily auto-renew job renews the domain for a year shortly before it ends and takes the price from the customer's wallet first. Either way we ask the registrar never to renew the domain by itself, since nobody would have paid for such a renewal. Its answer changes nothing here. Answers 404 for a registration that is not the customer's and 409 for one that is not active or expiring_soon. Rate limited as org_domains.setting and written to the audit log as domain.setting_changed.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
enabled boolean yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
message string
domain string
enabled boolean

Lock the domain against a transfer away, or unlock it

Section titled Lock the domain against a transfer away, or unlock it

PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/lock

Lock the domain against a transfer away, or unlock it.

A locked domain answers 409 on POST .../auth-code. Answers 404 for a registration that is not the customer's, 409 for one that is not active or expiring_soon, and 502 when the registry does not take the change, with nothing changed here. Rate limited as org_domains.setting and written to the audit log as domain.setting_changed.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
enabled boolean yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
message string
domain string
enabled boolean

Replace the domain's nameservers (2 to 13 host names) at the registry

Section titled Replace the domain's nameservers (2 to 13 host names) at the registry

PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/nameservers

Replace the domain's nameservers (2 to 13 host names) at the registry.

Moving a domain onto our nameservers links a DNS zone when the registration has none: the customer's own zone of that name, or a new one, never somebody else's. When no zone could be linked the nameservers still change, and dns_zone_conflict and dns_zone_message say so. uses_our_dns is true when one of the new nameservers is ours.

Answers 404 for a registration that is not the customer's, 409 for one that is not active or expiring_soon, and 502 when the registry does not take the change, with nothing changed here. Rate limited as org_domains.setting and written to the audit log as domain.nameservers_changed.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
nameservers array of string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
message string
domain string
nameservers array of string
uses_our_dns boolean
dns_zone_id integer or null
dns_zone_conflict boolean
dns_zone_message string or null

The domain's registrant contact as we hold it, whatever the registration's status

Section titled The domain's registrant contact as we hold it, whatever the registration's status

GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/registrant

The domain's registrant contact as we hold it, whatever the registration's status.

registrant is null until someone saves one or an order stored one. registry.status is sent once the registry holds this contact as the domain's registrant, with sent_at, and not_sent while it does not. A registration that is not the customer's answers 404.

Name In Type Required
reg_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
registrant RegistrantContact or null
registrant.name string or null
registrant.organization string or null
registrant.email string or null
registrant.phone string or null
registrant.address_line1 string or null
registrant.address_line2 string or null
registrant.city string or null
registrant.region string or null
registrant.postcode string or null
registrant.country string or null
registrant.country_name string or null
registry RegistrantRegistry
registry.status string, one of sent, not_sent
registry.sent_at string (date-time) or null

Replace the domain's registrant contact and send it to the registry

Section titled Replace the domain's registrant contact and send it to the registry

PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/registrant

Replace the domain's registrant contact and send it to the registry.

name, email, phone, address_line1, city and country (ISO 3166-1 alpha-2) are required, and organization, address_line2, region and postcode are not. A field left out is cleared. phone is + and the country code, a space, dot or hyphen, then the number. country_name may be sent back and is ignored, and any other field is a 422. A wrong value answers 422 with one entry per field.

We create a new contact at the registrar and make it the domain's registrant. The admin, technical and billing contacts stay as they are. When the registry refuses the contact or does not answer, the answer is 502 with the reason and nothing we hold changes. Saving the contact the registry already holds asks it nothing.

Answers 404 for a registration that is not the customer's and 409 for one that is not active or expiring_soon. Rate limited as org_domains.registrant. Each change is written to the audit log as domain.registrant_updated with the names of the fields that changed.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
name string or null no
organization string or null no
email string or null no
phone string or null no
address_line1 string or null no
address_line2 string or null no
city string or null no
region string or null no
postcode string or null no
country string or null no
country_name string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
registrant RegistrantContact or null
registrant.name string or null
registrant.organization string or null
registrant.email string or null
registrant.phone string or null
registrant.address_line1 string or null
registrant.address_line2 string or null
registrant.city string or null
registrant.region string or null
registrant.postcode string or null
registrant.country string or null
registrant.country_name string or null
registry RegistrantRegistry
registry.status string, one of sent, not_sent
registry.sent_at string (date-time) or null

Renew a registration at the registry for duration years (1 to 10), paid from the wallet

Section titled Renew a registration at the registry for duration years (1 to 10), paid from the wallet

POST /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/renew

Renew a registration at the registry for duration years (1 to 10), paid from the wallet.

The charge is the price for a year from GET .../renewal times duration. We take it from the wallet and commit before we ask the registry. When the registry refuses, or does not answer, we give the charge back and answer 502, or 503 with the detail "Domain registration is not available right now." when we cannot reach a registrar at all. A wallet that does not cover the charge answers 402 before anything is taken, with the detail that the register route sends.

Only an active or expiring_soon registration renews: any other status answers 409, and a registration that is not the customer's answers 404.

The registration then ends on the date the registry reported or, when it reported none, on its old end date plus the years renewed. new_expiry is the registry's date or null, charged the amount taken and balance what the wallet holds now. Rate limited as org_domains.renew and written to the audit log as domain.renewed, or domain.renewal_refunded when the charge went back.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
duration integer no
Status Meaning
202 Success.
422 The request is not valid. detail lists each problem.

Fields of a 202 response:

Field Type
message string
domain string
new_expiry string (date-time) or null
charged string
currency string
balance string

The price of a year of renewal, which POST .../renew charges times its duration

Section titled The price of a year of renewal, which POST .../renew charges times its duration

GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/renewal

The price of a year of renewal, which POST .../renew charges times its duration.

It is the extension's listed renew price from GET storefront/domains/prices when the list has one, and otherwise the registrar's price with the organization's markup, as search shows it. Answers 404 for a registration that is not the customer's, 409 for one that is not active or expiring_soon, 502 when there is no price, and 503 with the detail "Domain registration is not available right now." when we cannot reach a registrar to price it. Rate limited as org_domains.quote.

Name In Type Required
reg_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
renew_price string
currency string

Turn WHOIS privacy on or off at the registry

Section titled Turn WHOIS privacy on or off at the registry

PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/whois-privacy

Turn WHOIS privacy on or off at the registry.

Answers 404 for a registration that is not the customer's, 409 for one that is not active or expiring_soon, and 502 when the registry does not take the change, with nothing changed here. Rate limited as org_domains.setting and written to the audit log as domain.setting_changed.

Name In Type Required
reg_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
enabled boolean yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
message string
domain string
enabled boolean

Check whether a domain name is free to register and what a year costs

Section titled Check whether a domain name is free to register and what a year costs

POST /api/v1/orgs/{org_slug}/portal/domains/search

Check whether a domain name is free to register and what a year costs.

price is the first year at this organization's price, a string with two decimals in currency, or null when the registrar names none. renew_price is what each year after the first costs in a registration of several years: a registration of n years costs price plus n - 1 times renew_price. premium is true for a name the registry prices above its extension, and such a name costs price every year.

Answers 503 with Retry-After when the registrar is busy or does not answer: repeat the search. Answers 503 without it, with the detail "Domain registration is not available right now.", when we cannot reach a registrar at all. Answers 502 when the registrar refuses the request. The registrar's own wording is never sent. Rate limited as org_domains.search.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
domain string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
available boolean
price string or null
currency string
premium boolean
renew_price string or null

Start moving a domain here from another registrar, paid from the customer's wallet

Section titled Start moving a domain here from another registrar, paid from the customer's wallet

POST /api/v1/orgs/{org_slug}/portal/domains/transfer

Start moving a domain here from another registrar, paid from the customer's wallet.

auth_code is the transfer code the other registrar gave for the domain. A transfer adds a year to the registration and costs the price from POST portal/domains/transfer/quote. We take it from the wallet and commit before we ask the registrar. When the registrar refuses the transfer, or does not answer, we give the charge back and answer 502. When we cannot reach a registrar at all the answer is 503 with the detail "Domain registration is not available right now.", after the same refund. A wallet that does not cover the charge answers 402 before anything is taken, with the detail that the register route sends. A domain already registered here answers 409.

The registration is pending_transfer until the transfer completes. charged is the amount taken and balance what the wallet holds now. Rate limited as org_domains.transfer and written to the audit log as domain.transfer_started, or domain.transfer_refunded when the charge went back.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
domain string yes
auth_code string yes
Status Meaning
202 Success.
422 The request is not valid. detail lists each problem.

Fields of a 202 response:

Field Type
message string
domain string
registration_id integer
status string
charged string
currency string
balance string

What POST portal/domains/transfer charges for domain

Section titled What POST portal/domains/transfer charges for domain

POST /api/v1/orgs/{org_slug}/portal/domains/transfer/quote

What POST portal/domains/transfer charges for domain.

It is the extension's listed transfer price from GET storefront/domains/prices when the list has one, and otherwise the registrar's price with the organization's markup. Answers 502 when there is no price, and 503 with the detail "Domain registration is not available right now." when we cannot reach a registrar to price it. Rate limited as org_domains.quote.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
domain string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Fields of a 200 response:

Field Type
domain string
transfer_price string
currency string