Let customers give a server a web address
The portal API for a server's web address, with HTTPS and the customer's own domains, and for its TCP address.
These routes let a customer put a name in front of a port of a server they run. A web address is a hostname with HTTPS in front of one port, for a website, an API or a dashboard: a free name under your domain, and the customer's own domains beside it. A TCP address is a name and a port on our network that forward TCP connections to one port, for anything that does not speak HTTP, such as a database client. Every route is under /portal/servers/{uuid}/ and takes the customer's token as Authorization: Bearer $CUSTOMER_TOKEN.
Before you begin
Section titled Before you begin- Ask support to turn server addresses on for your organization. They are off by default. Support turns on web addresses, TCP addresses or both, and sets the domain the free web names sit under and how many of their own domains a customer may add to one server (5 unless you ask for another number). Free web names sit under your join domain unless you name another domain whose DNS Coritan hosts.
- Read the state to learn what your storefront offers. Each state has
offered. While it isfalse, the routes that make something new answer404withWeb addresses are not available here.orTCP addresses are not available here., so show a card only whenofferedistrueor the server already holds an address. - Get a customer token as Sign customers in to your storefront describes.
- Find the server's
uuid. It isresource.uuidon the customer's service (Let customers run their servers).
Only the server's owner can change an address. What a shared customer can do covers everyone else.
Read the state and show the cards
Section titled Read the state and show the cardscurl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
{
"offered": true,
"web_domain": "example.gg",
"can_manage": true,
"max_domains": 5,
"suggested_name": "harbor-bot",
"ports": [{"port": 25580, "primary": true}, {"port": 25581, "primary": false}],
"web_address": {
"id": 12,
"name": "harbor-bot",
"hostname": "harbor-bot.example.gg",
"url": "https://harbor-bot.example.gg",
"port": 25580,
"follows_primary": true,
"status": "active",
"certificate": {"state": "active"},
"created_at": "2026-11-18T10:00:00"
},
"domains": []
}
| Field | What it holds |
|---|---|
offered |
Whether a customer can turn a web address on and add a domain. |
web_domain |
The domain a free name sits under, or null. |
can_manage |
true for the server's owner. Hide the forms and buttons when it is false. |
max_domains |
How many own domains one server may carry. |
suggested_name |
A free name to put in the form, made from the server's name, or null. |
ports |
The server's ports, the primary first, for a port picker. |
web_address |
null until the customer turns one on. port is the port it forwards to, and follows_primary says it moves with the primary port. status is active or suspended. |
domains |
The customer's own domains, oldest first (Add the customer's own domain). |
Every web address route but the name check answers this state, so your page reads it once and replaces it after each change.
The TCP address has a state of its own:
curl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/tcp-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
{
"offered": true,
"tcp_domain": "example.gg",
"can_manage": true,
"suggested_name": "harbor-db",
"ports": [{"port": 25580, "primary": true}],
"tcp_address": null
}
tcp_domain and suggested_name are empty strings when there is none. Give the server a TCP address shows tcp_address once the server has one.
Check a name
Section titled Check a nameA free web name, the name of a TCP address and a server's join address share their names, so a name one of them holds is taken for all three. Check a name while the customer types:
curl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address/availability?name=My%20Bot" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
{"name": "my-bot", "hostname": "my-bot.example.gg", "available": true, "reason": null}
We read the name as typed: capitals become lowercase, and spaces, dots and underscores become hyphens. name is the name as we would store it. When available is false, reason is a sentence to show under the field, such as That name is taken. Try another. A name is 3 to 28 lowercase letters, numbers and hyphens, and cannot be only numbers. Use the same call for the TCP address form.
Turn the web address on
Section titled Turn the web address oncurl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "harbor-bot", "port": 25581}'
| Field | What it holds |
|---|---|
name |
Required. The part in front of web_domain. |
port |
Optional. One of the server's ports. Leave it out and the address follows the primary port, whichever port that becomes. |
The answer is 201 with the state, and web_address.status is active. Tell the customer what their app must do: listen on that port and answer plain HTTP. We add HTTPS, send visitors who ask over HTTP to HTTPS, and pass WebSocket connections through.
We order the certificate at once. Read certificate.state in the answer:
state |
What to show |
|---|---|
active |
The address answers over HTTPS. |
pending |
The certificate is on its way. Read GET /web-address again every few seconds until the state changes. |
failed |
The order ended without a certificate. Offer a button that calls POST /web-address/certificate. |
none |
The name has no certificate and no order. An own domain reads none while it waits for its DNS. |
POST /web-address/certificate takes no body. It orders a certificate again for each name of the server whose state is failed or none, leaves the others alone, and answers the state.
A stopped server cannot answer, so visitors see an error page until it starts. A visit does not start a stopped server.
Change the port
Section titled Change the portcurl -X PATCH "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"port": 25580}'
port is required: one of the server's ports, or null to follow the primary port. The free name and every own domain move together, because a server's web address forwards to one port. The answer is the state.
Add the customer's own domain
Section titled Add the customer's own domainA customer adds a full name, such as www.example.com, once the web address is on:
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address/domains" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hostname": "www.example.com"}'
The answer is 201 with the state. What the new entry of domains says depends on where the domain's DNS is hosted.
A domain hosted on your storefront's DNS
Section titled A domain hosted on your storefront's DNSWhen the customer holds the domain's zone on your storefront (Host a customer's DNS) and the zone shows the domain is theirs, we write the record ourselves. The zone shows it when the customer registered the domain with you, or when the domain's nameservers are ours. Until a domain registered elsewhere is delegated to our nameservers, its zone proves nothing, and the domain is added as one hosted elsewhere. The domain is active at once, with dns.mode set to hosted:
{
"id": 14,
"hostname": "www.example.com",
"url": "https://www.example.com",
"status": "active",
"dns": {"mode": "hosted", "record": null, "error": null, "checked_at": null},
"certificate": {"state": "pending"},
"created_at": "2026-11-18T10:06:00"
}
The zone's record list shows that record with proxied set to true and the comment Web address of a server. The customer removes it by removing the domain here, never on the DNS pages.
A domain hosted elsewhere
Section titled A domain hosted elsewhereOtherwise the domain is pending, with dns.mode set to cname, and dns.record is the record the customer publishes at their DNS host:
{
"id": 13,
"hostname": "www.example.com",
"url": "https://www.example.com",
"status": "pending",
"dns": {
"mode": "cname",
"record": {"type": "CNAME", "name": "www.example.com", "value": "harbor-bot.example.gg"},
"error": null,
"checked_at": null
},
"certificate": {"state": "none"},
"created_at": "2026-11-18T10:04:00"
}
Show the record's type, name and value, each with a copy button. As a zone file line it reads:
www.example.com. CNAME harbor-bot.example.gg.
When the customer says the record is published, check it:
curl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address/domains/13/verify" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
The call looks the record up once and answers the state. When we find the record, the domain is active and we order its certificate. When we do not, it stays pending and dns.error is a sentence to show, such as We found no CNAME record at www.example.com yet. A domain that stays pending for 7 days leaves the list the next time the state is read.
A domain with no name in front, such as example.com, cannot hold a CNAME record. It can be added only when its DNS is hosted on your storefront and its nameservers are ours.
Remove a domain
Section titled Remove a domaincurl -X DELETE "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address/domains/13" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
The answer is 204. We remove the domain, its certificate and the DNS record we wrote for it. The free name and the other domains stay. A CNAME record at another DNS host is the customer's to delete.
Turn the web address off
Section titled Turn the web address offcurl -X DELETE "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
The answer is 204. We remove the free name and every own domain, with their certificates and the DNS records we wrote.
Caution
Turning the web address off cannot be undone. Every address of the server stops working. The free name stays with this server for 30 days: the server can take it back at once, and no other server can take it until then. Name each address in your confirmation.
Give the server a TCP address
Section titled Give the server a TCP addresscurl -X POST "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/tcp-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "harbor-db", "port": 25580}'
name is required and goes in front of tcp_domain. port is one of the server's ports, and the primary port when you leave it out. The answer is 201 with the state:
{
"offered": true,
"tcp_domain": "example.gg",
"can_manage": true,
"suggested_name": "harbor-db",
"ports": [{"port": 25580, "primary": true}],
"tcp_address": {
"id": 77,
"name": "harbor-db",
"hostname": "harbor-db.example.gg",
"listen_port": 61012,
"address": "harbor-db.example.gg:61012",
"port": 25580,
"status": "active",
"created_at": "2026-11-18T10:00:00"
}
}
Show address with a copy button: it is what a client connects to. Tell the customer three things:
- The address carries TCP only. A game that connects over UDP uses the server's own address and port.
- We pick
listen_port, the port on our network. It stays the same for as long as the address exists. - The server sees our network's address as the client, never the visitor's own.
A server has one TCP address, and no route changes it. To use another name or port, remove it and make a new one, which gets a new listen_port:
curl -X DELETE "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/tcp-address" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"
The answer is 204. The address stops accepting connections, and anyone can take its name.
What follows the server
Section titled What follows the serverThe addresses stay with the server, and the customer does nothing for these:
| When | What happens |
|---|---|
| The server moves to another location or machine | Both addresses keep their names and reach the server where it runs now. The server gets new ports in a move, so a web address that named a port follows the primary port from then on, and a TCP address forwards to the new primary port. |
| The primary port changes, or a Floating IP is attached or detached | The web address follows. |
| The service is suspended | The addresses read suspended and stop reaching the server. They read active again when the service is restored. |
| The service ends | We remove the web address, its domains and the TCP address. Anyone can take the names. |
The customer has one thing to do themselves: free a port before they remove it. DELETE /allocations/{allocation_id} answers 400 with A web address sends visitors to this port. Change the web address to another port, or turn it off, then remove the port. while the web address names that port. A web address that follows the primary port names none. The same call answers 400 with A TCP address forwards to this port. Remove the TCP address, then remove the port. while the server's TCP address forwards to the port: the customer removes the TCP address first.
Rate limits
Section titled Rate limitsWe count each action for each customer on one server. An owner's call counts when we refuse it too, such as one for a name that is taken. 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 for one server |
|---|---|
| Check a name | 60 a minute |
| Turn the web address on | 10 an hour |
| Change the port | 30 in 10 minutes |
| Turn the web address off | 10 an hour |
| Add or remove a domain | 12 an hour, shared |
| Check a domain's DNS | 12 in 10 minutes |
| Order a certificate again | 6 an hour |
| Make a TCP address | 6 an hour |
| Remove a TCP address | 6 an hour |
Reading either state spends nothing.
What a shared customer can do
Section titled What a shared customer can doA customer the owner shared the server with reads both states and checks names when they hold allocation.read, and gets 403 with Insufficient permissions without it. They can never change an address, whatever they hold: every other route answers 403 with a sentence such as Only the server's owner can change its web address. The state says so with can_manage set to false.
A read-only support session reads the states and cannot change them.
What these routes do not serve
Section titled What these routes do not serve- A second web port. Every name of a server forwards to one port.
- A switch for the firewall. A web address runs our web proxy's default rules, and no route turns them off.
- A domain with no name in front whose DNS is hosted elsewhere.
- UDP on a TCP address.
When you stop offering addresses
Section titled When you stop offering addressesWhen support turns server addresses off, turning a web address on, adding a domain and making a TCP address answer 404. Customers keep the addresses they hold. They can still read them, change the port, check a waiting domain, order a certificate again and remove them, so keep the card of a server that holds an address.
Result
Section titled ResultA customer picks a name on your storefront and opens their app at https://harbor-bot.example.gg, then at their own domain. A second program connects to harbor-db.example.gg:61012. Both addresses follow the server when it moves.
Troubleshooting
Section titled Troubleshooting404withWeb addresses are not available here.orTCP addresses are not available here.- Your organization does not offer that kind of address. Ask support to turn it on, and hide the form while
offeredisfalse. 403withOnly the server's owner can change its web address.- The customer does not own the server. The TCP routes say
Only the server's owner can make a TCP address.andOnly the server's owner can remove a TCP address.Hide the forms whencan_manageisfalse. 409withThat name is taken. Try another.- A join address, a web address, a TCP address or a DNS name holds it. Offer
suggested_name, or check another name. 422withUse 3 to 28 lowercase letters, numbers and hyphens. A name cannot start or end with a hyphen.- The name has the wrong shape. The other name refusals are
That name is reserved. Try another.,A name cannot be only numbers. Add a letter.andEnter a name.Show the sentence under the field. 409withThis server already has a web address.orThis server already has a TCP address.- A server has one of each. Remove it to take another name.
409withThis server has no port yet. Add a port, then try again.- The server has no port to forward to. Add one as Ports describes.
422withPort 25590 is not one of this server's ports.- Send a
portfromportsin the state.Port 25581 cannot have a TCP address.means the server holds that port on another address than its primary port's, so choose another. 409withWeb addresses are not ready here yet. Try again later.- Coritan does not host the DNS of your web domain yet. Contact support.
409withThis server cannot have a web address yet. Contact support.- The server has no service of yours behind it. The TCP route says the same about a TCP address. Contact support.
409withTurn on this server's web address first. Then add your own domain.- An own domain needs the free name first, because its CNAME record points at it.
403withA server can have 5 of your own domains. Remove one, then add this one.- The server holds
max_domainsdomains. One that waits for its DNS counts. 422withUse a name such as www.example.com. A domain with no name in front cannot point at a web address unless its DNS is hosted here.- The customer typed a bare domain whose DNS is hosted elsewhere. They add
www.example.com, or move the domain's DNS to your storefront. 422withwww.example.gg cannot be added here. Use a domain of your own.- The name is under a domain whose names we hand out, such as your web domain or a join domain.
422withThe DNS of www.example.com is hosted here on another account. Add it from the account that holds the domain.- A zone on Coritan covers the name, and it is not this customer's.
409withwww.example.com is already in use. Remove it where it is used, then add it again.- Another web address or web proxy answers for the name.
409withexample.com already has a record at www. Delete it on the domain's DNS records tab, then add the domain again.- The customer's zone has an
A,AAAAorCNAMErecord at the name. They delete it, then add the domain again. 409withAnother server got www.example.com first. Remove it there, then check again.- Two servers waited on the same name and the other one verified first.
dns.erroriswww.example.com points at other.example.net. Point it at harbor-bot.example.gg.- The CNAME record points somewhere else. The customer changes its value to the one in
dns.record.We could not check www.example.com now. Try again in a few minutes.means our lookup failed, so check again later. 404withThis server has no such domain.- The
domain_idis not in this server'sdomains. Read the state again: a domain that waited 7 days is removed. 422or503withWe could not make a TCP address for this server. Try again later.- The address could not be made. Nothing was created.
503withNo TCP address is free right now. Try again later.means no port on our network is free for the server's location. Try again later, and contact support if it keeps failing. 404withThis server has no TCP address.- There is none to remove. Read the state again.
400when removing a port- A web address forwards to it. See What follows the server.
429withrate_limited- The customer repeated an action too quickly. Wait for the seconds in
Retry-After, then try again.
Related
Section titled Related- Build a storefront on the Organization API
- Let customers run their servers, for a server's ports
- Let customers register domains and host DNS, for a domain hosted on your storefront
- SSL certificates