# Let customers register domains and host DNS

> The portal API for selling domain names paid from a customer's wallet, and for hosting their DNS zones and records.

Source: https://www.coritan.com/docs/organizations/storefront/portal-domains/

These routes let your customers search for a domain name, register it or transfer it in, renew it, change its settings, and host DNS zones and records on our nameservers. A customer pays for a registration, a renewal and a transfer from their wallet. The price list is public. Every other route takes the customer's token as `Authorization: Bearer $CUSTOMER_TOKEN` and works only on the registrations and zones that customer holds. Any other id answers `404`, the same as one that does not exist. [Domains and DNS](/docs/learn/domains-and-dns/) explains registrars, nameservers and zones.

## Before you begin

- Ask [support](https://www.coritan.com/dashboard/support) to turn domain sales on for your organization. It is off by default. Today we offer it only to organizations that Coritan runs itself, with a tax rate of zero, because a wallet charge adds no tax. Support also sets your markup on the registry's prices and how many DNS zones one customer may hold.
- Read the [price list](#show-the-price-list) to learn whether your storefront sells domains. While domain sales are off, the routes that sell answer `404` with `Domains are not available here.`, so show your domain pages only when the price list answers `200`. [When you stop selling domains](#when-you-stop-selling-domains) lists those routes.
- Get a customer token as [Sign customers in to your storefront](/docs/organizations/storefront/customer-sign-in/) describes.
- Let customers add credit. A customer pays from their wallet, which we hold in US dollars: `GET /portal/credit` returns its `balance`, and [Add credit](/docs/organizations/storefront/customer-portal/#add-credit) shows the top-up routes. Nothing here raises an invoice.

Every amount on this page is a string with two decimals, such as `"12.99"`, in the `currency` beside it, which is `USD`.

## Show the price list

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/storefront/domains/prices"
```

```json
{
  "currency": "USD",
  "tlds": [
    {"tld": ".com", "register": "16.32", "renew": "16.32", "transfer": "16.32", "restore": "151.38", "min_years": 1, "max_years": 10, "on_sale": false}
  ],
  "updated_at": "2026-10-12T05:30:00"
}
```

The call needs no token. `tlds` holds every extension on sale, sorted by name, at your organization's prices for one year:

| Field | What it holds |
| --- | --- |
| `register` | The first year of a registration of an ordinary name. A premium name can cost more, and the search shows its price. |
| `renew` | One year of renewal. A renewal charges this price, and so does each year after the first of a longer registration. |
| `transfer` | A transfer in, which adds a year to the registration. A transfer charges this price. |
| `restore` | The price of restoring an expired name, or `null` when there is none. These routes do not restore a name. |
| `min_years`, `max_years` | How many years one purchase may cover. |
| `on_sale` | `true` while `register` is a limited offer. |

`updated_at` is when we last refreshed the list, or `null`. Browsers and caches may keep the answer for 60 seconds when the request carries no token. The call answers `404` with `Domains are not available here.` when your organization does not sell domains.

## Search for a name

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/search" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
```

```json
{"domain": "example.com", "available": true, "price": "12.99", "renew_price": "16.99", "currency": "USD", "premium": false}
```

We lowercase `domain` and drop a trailing dot. The answer has these fields:

| Field | What it holds |
| --- | --- |
| `available` | `true` when the name is free to register. |
| `price` | The first year, or `null` when the registry names no price. |
| `renew_price` | Each year after the first in a registration of several years. It is `null` when `price` is. |
| `premium` | `true` for a name the registry prices above its extension. A premium name costs `price` every year, so its `renew_price` equals `price`. |

A registration of n years costs `price` + (n − 1) × `renew_price`. With the answer above, 1 year costs 12.99, 2 years cost 12.99 + 16.99 = 29.98, and 3 years cost 12.99 + 2 × 16.99 = 46.97. Show the customer that total before they order, because the registration charges it.

The search answers `422` when `domain` is not a domain name. It answers `503` with a `Retry-After` header when the registry is busy or does not answer, so send the search again after that many seconds. It answers `502` with `We could not check this name. Try again in a moment.` when the registry refuses the request.

## Register a domain

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/register" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com", "duration": 2, "whois_privacy": true}'
```

| Field | What it holds |
| --- | --- |
| `domain` | Required. The name to register. |
| `duration` | Years, 1–10. The default is 1. |
| `whois_privacy` | Whether WHOIS privacy starts on. The default is `true`. |
| `nameservers` | Optional. 2–13 host names, such as `ns1.example.net`. Leave it out and the domain uses our nameservers. |
| `registrant` | Optional. The domain's owner, with the fields that [Change the registrant contact](#change-the-registrant-contact) lists. Leave it out and the registry records our default contact as the registrant, so send it or have the customer save one afterwards. |

The answer is `201` with the registration, the amount we took in `charged`, and what the wallet holds now in `balance`:

```json
{
  "id": 7,
  "domain": "example.com",
  "status": "active",
  "registered_at": "2026-01-15T10:30:00Z",
  "expires_at": "2028-01-15T10:30:00Z",
  "nameservers": ["ns1.coritan.com", "ns2.coritan.com"],
  "uses_our_dns": true,
  "whois_privacy": true,
  "locked": true,
  "auto_renew": true,
  "dns_zone_id": 42,
  "dns_zone_conflict": false,
  "dns_zone_message": null,
  "charged": "29.98",
  "currency": "USD",
  "balance": "70.02"
}
```

A new domain starts with the transfer lock and auto-renew on.

### What the order charges

The charge is the total the search shows: `price` for the first year and `renew_price` for each year after it. We take it from the wallet before we ask the registry. When the registry refuses the order or does not answer, we put the charge back in the wallet and answer `502` with a sentence that ends `We returned 29.98 USD to your balance.`

A wallet that does not cover the charge answers `402`, and we take nothing:

```json
{
  "detail": {
    "error": "insufficient_credit",
    "message": "This registration costs 29.98 USD. Your balance is 4.00 USD. Add credit, then try again.",
    "required": "29.98",
    "available": "4.00",
    "currency": "USD"
  }
}
```

Test `detail.error`, show `detail.message`, and send the customer to [add credit](/docs/organizations/storefront/customer-portal/#add-credit) for at least `required` less `available`. Then send the same order again. A renewal and a transfer answer the same `402`, with `This renewal costs` or `This transfer costs` in the message.

### Names an order refuses

Each of these answers `409` before we take anything:

| `detail` | What it means |
| --- | --- |
| `This domain is not available for registration.` | Somebody else holds the name. Offer the customer another name. |
| `This domain is already registered here.` | Somebody registered the name through us, or an order for it is in progress. A second click on the order button gets this answer, so read the customer's list before you show an error. |
| `This domain was registered here before. Contact support and we will set it up for you again.` | A registration of the name ended here. Your staff ask support to set it up again. |
| `Another account already has a DNS zone for this domain here. Choose other nameservers for the domain, or contact support and we will move the zone to your account.` | The order uses our nameservers, and another account holds a DNS zone of the name. Send the order with `nameservers` that are not ours, or ask support to move the zone. |

### Nameservers and the zone

A domain on our nameservers gets a DNS zone that belongs to the customer: the zone of that name they already hold, or a new one. `dns_zone_id` is its id, and [Add and change records](#add-and-change-records) shows what the customer can do with it. An order whose `nameservers` are not ours gets no zone here.

`dns_zone_conflict` is `true` when the domain is registered and we could not link a zone. The registration stands, and `dns_zone_message` is a sentence for the customer that tells them to contact support. Only the answers to a registration and to a change of nameservers set these two fields. Every other answer carries `false` and `null`.

### While the order runs

We write the registration with the status `pending_registration` when we take the charge, and it becomes `active` when the registry confirms. Until then, the customer's list can show the domain as `pending_registration` for a short time. When the registry refuses the order, the pending registration goes and the charge is back in the wallet.

## Transfer a domain in

1. Ask what the transfer costs:

   ```bash
   curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/transfer/quote" \
     -H "Authorization: Bearer $CUSTOMER_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"domain": "example.com"}'
   ```

   ```json
   {"domain": "example.com", "transfer_price": "14.99", "currency": "USD"}
   ```

   A transfer adds a year to the registration. The price is the extension's `transfer` price from the price list when the list has one.

2. Have the customer unlock the domain at their current registrar and copy its transfer code, which registrars also call an EPP code or an auth code.

3. Start the transfer:

   ```bash
   curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/transfer" \
     -H "Authorization: Bearer $CUSTOMER_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"domain": "example.com", "auth_code": "AbC123xYz"}'
   ```

   The answer is `202`:

   ```json
   {"message": "Transfer started", "domain": "example.com", "registration_id": 8, "status": "pending_transfer", "charged": "14.99", "currency": "USD", "balance": "55.03"}
   ```

The registration is `pending_transfer` until the transfer completes, and it takes no renewal or change of settings until then. We ask the registry about each pending transfer several times a day:

- When the transfer completes, the registration becomes `active`, with the transfer lock and auto-renew on. A domain that is on our nameservers gets a zone that belongs to the customer.
- When the other registrar rejects the transfer, we put the charge back in the customer's wallet and remove the pending registration. The customer can start again with a new code.

Starting a transfer can fail in these ways:

- `402` when the wallet does not cover the price. We take nothing.
- `409` with `This domain is already registered here.` or `This domain was registered here before. Contact support and we will set it up for you again.`, as [Names an order refuses](#names-an-order-refuses) explains. A second transfer of a name while the first is pending gets the first of the two.
- `422` with `Enter the domain's transfer code.` for a blank `auth_code`.
- `502` with `Transfer failed:`, the reason and the amount we returned to the balance, when the registry refuses at once. The pending registration is gone.

## List a customer's domains {#list-domains}

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations?status=active&per_page=25" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

The answer is `{"registrations": [...], "total": n}`, newest first. Each registration has the fields of the answer under [Register a domain](#register-a-domain), without `charged`, `currency` and `balance`. `total` counts what the filters match.

| Parameter | What it does |
| --- | --- |
| `page`, `per_page` | The page, from 1, and its size, 1–100. The default size is 25. |
| `status` | Only registrations in exactly this status. A word outside the table below answers `422` with the allowed words. |
| `domain` | Only the registration of exactly this name. Case does not matter. |

`GET /portal/domains/registrations/{reg_id}` returns one registration, whatever its status.

| Field | What it holds |
| --- | --- |
| `id` | The id every route under `/portal/domains/registrations/{reg_id}` takes. |
| `status` | One of the words below. |
| `registered_at`, `expires_at` | When the registration started and when it ends. Both are `null` on a pending one. |
| `nameservers` | The domain's nameservers at the registry. |
| `uses_our_dns` | `true` when one of them is ours, so a zone here answers for the domain. |
| `whois_privacy`, `locked`, `auto_renew` | The three switches. |
| `dns_zone_id` | The customer's zone the domain answers from, or `null`. |

| Status | Meaning |
| --- | --- |
| `pending_registration` | We took the charge and the registry has not confirmed the order yet. |
| `pending_transfer` | A transfer in has started and has not completed. |
| `active` | The domain is registered. |
| `expiring_soon` | The domain ends in fewer than 30 days. |
| `expired`, `redemption` | The domain is past its end date. |
| `transferred_out`, `terminated` | The registration has ended here. |

A domain renews, and takes a change to a switch, its nameservers, its transfer code or its registrant, only while it is `active` or `expiring_soon`. In any other status those calls answer `409` with a sentence such as `You can do this only while the domain is active. This domain is expired.` Show the controls only for those two statuses.

## Renew a domain

Ask for the price of a year, then renew for 1–10 years:

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/renewal" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

```json
{"domain": "example.com", "renew_price": "16.99", "currency": "USD"}
```

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/renew" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"duration": 1}'
```

The renewal charges `renew_price` times `duration`, and `duration` defaults to 1. The answer is `202`:

```json
{"message": "Domain renewed", "domain": "example.com", "new_expiry": "2029-01-15T10:30:00Z", "charged": "16.99", "currency": "USD", "balance": "53.03"}
```

`new_expiry` is the end date the registry reported, or `null` when it reported none. The registration then ends on its old end date plus the years renewed, so read `expires_at` from the registration. A short wallet answers `402`. When the registry refuses, we put the charge back and answer `502` with `Renewal failed:`, the reason and the amount returned.

### How auto-renew works

While `auto_renew` is on, we renew the domain for one year in the days before `expires_at`. We take the price of a year from the customer's wallet first, at the price the renewal quote shows. We try once a day until the domain is renewed or ends.

When the wallet does not cover the year, we take nothing and renew nothing. We email the customer once for that renewal, from your organization and in your email design. By default the email gives the price of a year, the balance and the end date, and asks the customer to add credit. The next day's try renews the domain once the credit is there.

While `auto_renew` is off, we email the customer 30, 14, 7, 3 and 1 days before the domain ends, and they renew it themselves.

Turn auto-renew off or on with the switch:

```bash
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/auto-renew" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'
```

The answer is `{"message": "Auto-renew disabled", "domain": "example.com", "enabled": false}`.

## Set WHOIS privacy and the transfer lock

`PUT /portal/domains/registrations/{reg_id}/whois-privacy` and `PUT /portal/domains/registrations/{reg_id}/lock` take the same body as the auto-renew switch, `{"enabled": true}` or `{"enabled": false}`, and return the same three fields.

- WHOIS privacy hides the registrant's details in the public WHOIS record.
- The lock stops a transfer to another registrar. A locked domain gives out no transfer code.

Both change the setting at the registry. When the registry does not take the change, the call answers `502` with `The registry did not take the change. Try again later.` and the setting stays as it was.

## Change the nameservers

```bash
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/nameservers" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"nameservers": ["ns1.example.net", "ns2.example.net"]}'
```

`nameservers` replaces the whole list with 2–13 host names. We lowercase each and count a repeated one once. The answer has `nameservers`, `uses_our_dns`, `dns_zone_id`, `dns_zone_conflict` and `dns_zone_message`.

To host the domain's DNS here, send the names from `GET /portal/dns/nameservers`. Moving a domain onto our nameservers links a zone when the registration has none: the customer's own zone of that name, or a new one. When another account already holds a zone of the name, the call answers `409` with `Another account already has a DNS zone for this domain here.` before we ask the registry, and the nameservers stay as they were. The customer keeps their other nameservers, or your staff ask support to move the zone.

## Give out the transfer code

To move a domain to another registrar, the customer turns the lock off, then asks for the code:

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/auth-code" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

```json
{"domain": "example.com", "auth_code": "AbC123xYz"}
```

The request is a `POST` with no body. It answers `409` with `Unlock the domain before you ask for its transfer code.` while the domain is locked. Show the code once and do not store it: whoever holds it can move the domain away. Each read goes into your audit log, without the code.

## Change the registrant contact

The registrant is the person or company the registry records as the domain's owner. Read the contact we hold with `GET /portal/domains/registrations/{reg_id}/registrant`, and replace it with `PUT`:

```bash
curl -X PUT "https://api.coritan.com/api/v1/orgs/acme/portal/domains/registrations/7/registrant" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Alex Morgan", "email": "alex@example.com", "phone": "+44 2071234567", "address_line1": "1 High Street", "city": "London", "postcode": "SW1A 1AA", "country": "GB"}'
```

| Field | Rule |
| --- | --- |
| `name` | Required. Up to 200 characters. |
| `organization` | Up to 200 characters. |
| `email` | Required. A valid address, up to 254 characters. |
| `phone` | Required. `+`, the country code, a space, dot or hyphen, then the number. |
| `address_line1` | Required. Up to 200 characters. |
| `address_line2` | Up to 200 characters. |
| `city` | Required. Up to 100 characters. |
| `region` | Up to 100 characters. |
| `postcode` | Up to 16 letters, digits, spaces and hyphens. |
| `country` | Required. Two letters, ISO 3166-1 alpha-2, such as `GB`. |

A field you leave out is cleared, so send the whole contact. Both calls answer the same shape:

```json
{
  "domain": "example.com",
  "registrant": {
    "name": "Alex Morgan", "organization": null, "email": "alex@example.com", "phone": "+44.2071234567",
    "address_line1": "1 High Street", "address_line2": null, "city": "London", "region": null,
    "postcode": "SW1A 1AA", "country": "GB", "country_name": "United Kingdom"
  },
  "registry": {"status": "sent", "sent_at": "2026-09-26T10:30:00+00:00"}
}
```

`registrant` is `null` until an order or a save stores a contact. `registry.status` is `sent` once the registry holds this contact as the registrant, and `not_sent` while it does not. You may send `country_name` back, and we ignore it. Any other extra field answers `422`. A wrong value answers `422` with one entry for each field in `detail`, and in a registration the entries sit under `registrant`. When the registry refuses the contact or does not answer, the call answers `502` with the reason and the contact we hold stays as it was.

## Host a customer's DNS {#host-dns}

A zone holds the DNS records of one domain, and our nameservers answer for it once the domain points at them. A customer gets a zone in two ways: with a domain they register here on our nameservers, or by adding a zone for a domain registered elsewhere.

### Show our nameservers

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/dns/nameservers" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

```json
{"nameservers": ["ns1.coritan.com", "ns2.coritan.com"]}
```

Show these names to a customer who points a domain at a zone here. Read them from this call each time, because the list can change.

### Add a zone for a domain registered elsewhere

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.org"}'
```

The answer is `201` with the zone:

```json
{
  "id": 43,
  "domain": "example.org",
  "status": "active",
  "dnssec_enabled": true,
  "serial": 1,
  "soa_email": "admin@example.org",
  "record_count": 2,
  "record_limit": 1000,
  "registration_id": null,
  "created_at": "2026-01-15T10:30:00",
  "updated_at": "2026-01-15T10:30:00"
}
```

A new zone is signed with DNSSEC and starts with our `NS` records at `@`. `registration_id` is the customer's registration of the same domain here, or `null` for a domain registered elsewhere. `record_limit` is how many records the zone may hold.

A customer may hold a limited number of zones for domains registered elsewhere: 10, unless support set another number for your organization. A zone with a `registration_id` does not count. The call refuses a zone in these cases:

| Answer | What it means |
| --- | --- |
| `403` with `Your account can hold 10 DNS zones for domains registered elsewhere. Delete a zone you no longer use, then try again.` | The customer is at the cap. With a cap of 0 the sentence is `Your account cannot add DNS zones for domains registered elsewhere.` |
| `403` with `This domain cannot be added here.` | We reserve the name, or it is an extension, such as `co.uk`, and no domain of its own. |
| `404` with `Domains are not available here.` | The customer did not register the domain here, and your organization does not sell domains. |
| `409` with `Another account registered this domain here, so only that account can add its DNS zone.` | Somebody else holds a registration of the domain here. |
| `409` with `A DNS zone for this domain already exists here. If the domain is yours, contact support.` | A zone of the name exists, the customer's own or another account's. |
| `409` with `This name is above or below a domain that another account holds here, so it cannot be added. If the domain is yours, contact support.` | The name is a parent or a child of a zone that is not the customer's. |

### List the zones

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

The answer is `{"zones": [...], "total": n, "max_zones": 10, "counted": 1}`, sorted by domain. `max_zones` is the cap and `counted` is how many of the customer's zones count against it, so offer a new zone while `counted` is below `max_zones`. `page` and `per_page` (1–100, default 25) page through the list, and `domain` returns only the zone of exactly that name. `GET /portal/dns/zones/{zone_id}` returns one zone. The list leaves out a free name the customer claimed under a domain your organization lends, which [its own routes](/docs/organizations/storefront/portal-networking/#offer-free-names-under-your-domain) manage.

`DELETE /portal/dns/zones/{zone_id}` deletes the zone with every record in it and answers `204`. Our nameservers stop answering for the domain. A registration of the domain stays, with `dns_zone_id` set to `null`. While a server's web address uses a name in the domain, the call answers `409` and deletes nothing ([Records of a server's web address](#records-of-a-server-s-web-address)).

> [!CAUTION]
> Deleting a zone cannot be undone. Offer the customer an [export](#import-and-export-a-zone-file) first.

### Add and change records

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/42/records" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "www", "record_type": "A", "content": "203.0.113.10", "ttl": 3600}'
```

| Field | What it holds |
| --- | --- |
| `name` | Required. Relative to the zone (`www`, or `@` for the domain itself) or in full (`www.example.com`). We store it relative. |
| `record_type` | Required. `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `SRV`, `NS`, `CAA`, `PTR`, `SVCB`, `HTTPS` or `DS`. |
| `content` | Required. The value, checked against the type, such as `2001:db8::10` for an `AAAA` record. |
| `ttl` | Seconds, 60–86400. The default is 300. |
| `priority`, `weight`, `port` | `priority` for `MX` and `SRV`, `weight` and `port` for `SRV`. |
| `comment` | Optional. A note for the customer. |

The answer is `201` with the record: its `id`, `zone_id`, the fields above, `proxied`, `created_at` and `updated_at`. [DNS record types](/docs/websites/dns/record-types/) explains what each type's content looks like.

| Route | What it does |
| --- | --- |
| `GET /portal/dns/zones/{zone_id}/records` | Lists the records as a plain array, by name and then type. `record_type` and `name` narrow the list, and `page` and `per_page` (1–1,000, default 100) page through it. |
| `GET /portal/dns/zones/{zone_id}/records/{record_id}` | Returns one record. |
| `PUT /portal/dns/zones/{zone_id}/records/{record_id}` | Changes a record. Send only the fields to change. `name` and `record_type` can change too. |
| `DELETE /portal/dns/zones/{zone_id}/records/{record_id}` | Deletes a record and answers `204`. |

These rules apply to every write:

- A zone keeps at least two `NS` records at `@`. A change or a delete that would leave fewer answers `422`.
- A `CNAME` cannot sit at `@` (`422`), or beside other records at its name (`409`).
- A zone holds up to `record_limit` records. One more answers `403` with `Record limit reached (1000)`.
- A name outside the zone, content that does not fit the type, an unknown type and a TTL outside its range each answer `422`.
- These routes write no proxied record. Leave `proxied` out. Sending `proxied: true` answers `422` with `Proxied records are not available here.` and writes nothing.

### Records of a server's web address

A zone can hold one kind of record with `proxied` set to `true`: the record we write when the customer adds a name in the domain to a server's web address ([Add the customer's own domain](/docs/organizations/storefront/portal-server-addresses/#add-the-customer-s-own-domain)). The record list shows it with the comment `Web address of a server`. The customer changes and removes it from the server, so show it as read-only on your DNS pages.

| Call | Answer |
| --- | --- |
| `PUT` or `DELETE` on that record, or a bulk delete that names it | `409` with `This record belongs to a server's web address. To change or remove it, remove the domain on the server's Addresses tab.` Nothing changes, and a bulk delete deletes nothing. |
| `DELETE` on a zone that holds one | `409` with `A server's web address uses a name in this domain. Remove the domain on the server's Addresses tab, then delete the zone.` |

Removing the domain from the server's web address deletes the record. The zone can be deleted after that.

### Delete several records at once

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/42/records/bulk-delete" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"record_ids": [311, 312, 318]}'
```

`record_ids` takes 1–1,000 ids, and the call deletes all of them or none. The answer is `{"deleted": 3}`. When an id is not a record of this zone, the call answers `404`, lists the ids it could not find in `detail.record_ids` and deletes nothing. When the delete would leave fewer than two `NS` records at `@`, it answers `422` and deletes nothing.

### Import and export a zone file

`GET /portal/dns/zones/{zone_id}/export` returns the zone as a BIND zone file in `zone_file`. To add the records of a file, such as another DNS host's export, send its text:

```bash
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/42/import" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"zone_file": "$ORIGIN example.com.\n@ 300 IN A 203.0.113.10\nwww 300 IN CNAME example.com."}'
```

```json
{"imported": 2, "duplicates": 0, "notes": [], "errors": []}
```

An import adds only the records the zone does not have, so a customer can import the same file again. `imported` counts the records added and `duplicates` the lines the zone already had. `notes` lists the lines we left out or changed on purpose, and `errors` the lines we could not read. Show both lists to the customer. A line we cannot read never fails the request.

- A file over 2 MB answers `413` with `This zone file is larger than 2 MB. Import it in parts.`
- We leave out the file's `SOA` record and its `NS` records at `@`, so the zone keeps our nameservers.
- Nothing is imported as proxied. A line that another host's export marks as proxied is stored as an ordinary record, and `notes` says so.
- An import that reaches `record_limit` stops there and says so in `errors`.

### Sign the zone with DNSSEC

Every new zone is signed. Resolvers check the signatures once the domain's registry publishes the zone's DS records, which the customer adds at the registrar of the domain. Read them here:

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/43/dnssec" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

```json
{
  "enabled": true,
  "algorithm": "ECDSAP256SHA256",
  "ksk_key_tag": 12345,
  "zsk_key_tag": 54321,
  "ds_records": ["example.org. 3600 IN DS 12345 13 2 ABCDEF0123456789..."],
  "zsk_rotated_at": "2026-01-01T00:00:00"
}
```

Show `ds_records` to a customer whose domain is registered elsewhere, and tell them to add the records in the DNSSEC settings of that registrar. `ds_records` is empty while signing is off. For a domain registered here, these routes send no DS record to the registry, so resolvers treat its zone as unsigned. [Set up DNSSEC](/docs/websites/dns/dnssec/) explains the DS record.

To switch signing off or on, send `dnssec_enabled` and nothing else:

```bash
curl -X PATCH "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/43" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"dnssec_enabled": false}'
```

The answer is the zone. Switching signing off keeps the keys, so switching it on again gives the same DS records. Any other field in the body answers `422`.

> [!WARNING]
> Tell the customer to remove the DS records at their registrar before they switch DNSSEC off. While the registry still publishes them, resolvers that check signatures refuse every answer for the domain.

### Check that the domain points here

```bash
curl "https://api.coritan.com/api/v1/orgs/acme/portal/dns/zones/43/delegation" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
```

```json
{
  "domain": "example.org",
  "status": "mixed",
  "expected": ["ns1.coritan.com", "ns2.coritan.com"],
  "found": ["ns1.coritan.com", "dns1.registrar.example"],
  "ours": ["ns1.coritan.com"],
  "checked_at": "2026-10-03T20:00:00Z"
}
```

We ask the zone above the domain which nameservers it lists. `expected` holds ours, `found` the ones it lists, and `ours` those of `found` that are ours.

| `status` | Meaning |
| --- | --- |
| `active` | Every nameserver it lists is ours. The zone answers for the domain. |
| `mixed` | Only some are ours. The customer removes the others at their registrar. |
| `pending` | None are ours, or it lists none. The customer has not set our nameservers yet, or the change has not reached the registry. |
| `unregistered` | The registry says the domain does not exist. |
| `unknown` | No nameserver answered the check. Try again later. |

We reuse an answer for two minutes. Add `fresh=true` to ask again, for a button the customer presses after they change their nameservers.

## What these routes do not serve

- No web proxy for a domain. These routes write no proxied record, and a registration takes no proxy or certificate options. A customer puts HTTPS in front of a server with [its web address](/docs/organizations/storefront/portal-server-addresses/), which can carry names in a zone they host here.
- No load balancers and no DNS query statistics.
- No restore of an expired domain.

Your staff see customers' zones in your organization's own DNS list, as [Host DNS zones for your organization](/docs/organizations/dns/) describes.

## Rate limits

We count each action for each customer. Past its budget, a call answers `429` with a `Retry-After` header, and `detail` holds `error` set to `rate_limited`, a `message`, the `action` and `retry_after_seconds`.

| Action | Budget |
| --- | --- |
| Search for a name | 30 a minute |
| Quote a renewal or a transfer | 30 a minute, shared |
| Register a domain | 10 an hour |
| Renew a domain | 10 an hour |
| Start a transfer | 10 an hour |
| Change WHOIS privacy, the lock, auto-renew or the nameservers | 30 in 10 minutes, shared |
| Save the registrant | 20 an hour |
| Read the transfer code | 6 an hour |
| Add a zone | 10 an hour |
| Delete a zone | 10 an hour |
| Add, change or delete a record | 240 in 10 minutes on one zone, shared |
| Delete several records at once | 30 in 10 minutes on one zone |
| Import a zone file | 10 an hour on one zone |
| Switch DNSSEC | 10 an hour on one zone |
| Check the delegation with `fresh=true` | 20 in 10 minutes on one zone |

Reading a list, a registration, a zone or a record spends nothing.

## What a support session can do

A [support session](/docs/organizations/storefront/customer-sign-in/#receive-a-support-session) reads everything the customer can read with `GET`. Every other call answers `403` in a read-only session, and that includes the search and the two quotes, which are `POST` requests. A full-access session can make the changes the customer can, with two exceptions that always answer `403`: reading the transfer code and changing the registrant. Ask the customer to do those themselves.

Every change a customer makes goes into your [audit log](/docs/organizations/audit-log/), with the customer as the actor.

## When you stop selling domains

When support turns domain sales off for your organization, these calls answer `404` with `Domains are not available here.`:

- the price list;
- the search;
- a registration;
- a transfer and its quote;
- adding a zone for a domain the customer did not register here.

Every other route keeps working, so customers keep what they paid for. They can still list their domains and zones, renew, change the switches, the nameservers and the registrant, read the transfer code, edit records and add the zone of a domain they registered here. Auto-renew keeps renewing their domains from their wallets at your prices. Keep the pages for a customer's own domains and zones on your storefront, and hide only the search and the order pages.

A customer who holds a registration that has not ended cannot close their account. [Edit the profile or close the account](/docs/organizations/storefront/customer-portal/#edit-the-profile-or-close-the-account) explains the refusal.

## Result

A customer finds a name on your storefront, pays for it from their wallet and sees it in their list as `active`. The domain answers from a zone they edit on your pages, and it renews each year while their wallet covers the price.

## Troubleshooting

`404` with `Domains are not available here.`
: Your organization does not sell domains, or stopped. Ask [support](https://www.coritan.com/dashboard/support) to turn domain sales on, and hide the search and order pages until the price list answers `200`.

`409` with `This record belongs to a server's web address.` or `A server's web address uses a name in this domain.`
: The record was written for a server's web address. The customer removes the domain from the server first ([Records of a server's web address](#records-of-a-server-s-web-address)).

`404` with `Domain registration not found`, `Zone not found` or `Record not found`
: The id is not one of this customer's. Take it from the customer's own list.

`402` with `insufficient_credit`
: The wallet does not cover the charge, and nothing was taken. Send the customer to [add credit](/docs/organizations/storefront/customer-portal/#add-credit), then send the request again.

`409` with `You can do this only while the domain is active.`
: The registration is not `active` or `expiring_soon`. The sentence ends with its status. A pending one becomes `active` by itself. These routes cannot renew an expired one, so your staff ask [support](https://www.coritan.com/dashboard/support).

`409` with `Unlock the domain before you ask for its transfer code.`
: Turn the lock off with `PUT .../lock` and `{"enabled": false}`, then ask again.

`502` that ends `We returned 29.98 USD to your balance.`
: The registry refused the order, the renewal or the transfer, or did not answer. The charge is back in the wallet. Show the sentence to the customer: it carries the registry's reason, such as a wrong transfer code.

`502` with `We could not get a price for this domain. Try again later.`
: We have no price for the name. Nothing was taken. Try again later, or offer another name.

`502` with `The registry did not take the change. Try again later.` or `We could not get the transfer code from the registry. Try again later.`
: The registry refused or did not answer. Nothing changed. Try again in a few minutes.

`503` with a `Retry-After` header
: The registry was busy while we checked the name. Nothing was taken. Send the request again after that many seconds.

`503` with `Domain registration is not available right now.`
: We cannot reach a registry at all. Nothing stays charged. Try again later, and [contact support](https://www.coritan.com/dashboard/support) if it keeps failing.

`403` from a support session
: The session is read-only, or it asked for a transfer code or a change of registrant. See [What a support session can do](#what-a-support-session-can-do).

`429` with `rate_limited`
: The customer repeated an action too quickly. Wait for the seconds in `Retry-After`, then try again.

## Related

- [Build a storefront on the Organization API](/docs/organizations/storefront/)
- [Build the customer account area](/docs/organizations/storefront/customer-portal/)
- [Let customers manage IPs, protection and domains](/docs/organizations/storefront/portal-networking/), for free names under a domain your organization lends
- [Let customers give a server a web address](/docs/organizations/storefront/portal-server-addresses/), for HTTPS on a name in a customer's zone
- [Host DNS zones for your organization](/docs/organizations/dns/)
- [How domain registration works](/docs/websites/domains/)

## API

- `GET /api/v1/orgs/{org_slug}/storefront/domains/prices`: What a year of each domain extension costs at this storefront (https://www.coritan.com/docs/api/reference/organizations/storefront/storefront/#op-get-api-v1-orgs-org-slug-storefront-domains-prices)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-register)
- `GET /api/v1/orgs/{org_slug}/portal/domains/registrations`: The customer's domain registrations, newest first, with total for the same filters (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-get-api-v1-orgs-org-slug-portal-domains-registrations)
- `GET /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}`: One of the customer's registrations, whatever its status (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-get-api-v1-orgs-org-slug-portal-domains-registrations-reg-id)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-auth-code)
- `PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/auto-renew`: Turn auto-renew on or off (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-put-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-auto-renew)
- `PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/lock`: Lock the domain against a transfer away, or unlock it (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-put-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-lock)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-put-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-nameservers)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-get-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-registrant)
- `PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/registrant`: Replace the domain's registrant contact and send it to the registry (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-put-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-registrant)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-renew)
- `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 (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-get-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-renewal)
- `PUT /api/v1/orgs/{org_slug}/portal/domains/registrations/{reg_id}/whois-privacy`: Turn WHOIS privacy on or off at the registry (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-put-api-v1-orgs-org-slug-portal-domains-registrations-reg-id-whois-privacy)
- `POST /api/v1/orgs/{org_slug}/portal/domains/search`: Check whether a domain name is free to register and what a year costs (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-search)
- `POST /api/v1/orgs/{org_slug}/portal/domains/transfer`: Start moving a domain here from another registrar, paid from the customer's wallet (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-transfer)
- `POST /api/v1/orgs/{org_slug}/portal/domains/transfer/quote`: What POST portal/domains/transfer charges for domain (https://www.coritan.com/docs/api/reference/organizations/customer-portal/domains/#op-post-api-v1-orgs-org-slug-portal-domains-transfer-quote)
- `GET /api/v1/orgs/{org_slug}/portal/dns/nameservers`: The nameservers a domain is pointed at to use a zone here (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-nameservers)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones`: The customer's zones, by domain, each with its record count (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones)
- `POST /api/v1/orgs/{org_slug}/portal/dns/zones`: Add a zone for domain (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-post-api-v1-orgs-org-slug-portal-dns-zones)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}`: One of the customer's zones (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id)
- `PATCH /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}`: Switch DNSSEC on or off for the zone (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-patch-api-v1-orgs-org-slug-portal-dns-zones-zone-id)
- `DELETE /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}`: Delete the zone and every record in it (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-delete-api-v1-orgs-org-slug-portal-dns-zones-zone-id)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/delegation`: Get zone delegation (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id-delegation)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/dnssec`: Get DNSSEC info (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id-dnssec)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/export`: The zone as a BIND zone file, in zonefile (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id-export)
- `POST /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/import`: Add the records of a BIND zone file, such as another DNS host's export, to the zone (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-post-api-v1-orgs-org-slug-portal-dns-zones-zone-id-import)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records`: The zone's records, by name and then type (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records)
- `POST /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records`: Add a record to the zone (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-post-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records)
- `POST /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records/bulk-delete`: Delete several of the zone's records as one change: all of them or none (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-post-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records-bulk-delete)
- `GET /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records/{record_id}`: One record of the zone (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-get-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records-record-id)
- `PUT /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records/{record_id}`: Change a record: send only the fields to change (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-put-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records-record-id)
- `DELETE /api/v1/orgs/{org_slug}/portal/dns/zones/{zone_id}/records/{record_id}`: Delete one record (https://www.coritan.com/docs/api/reference/organizations/customer-portal/dns/#op-delete-api-v1-orgs-org-slug-portal-dns-zones-zone-id-records-record-id)
