Skip to content
Coritan Docs

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.

View as Markdown

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.

  • 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 is false, the routes that make something new answer 404 with Web addresses are not available here. or TCP addresses are not available here., so show a card only when offered is true or the server already holds an address.
  • Get a customer token as Sign customers in to your storefront describes.
  • Find the server's uuid. It is resource.uuid on 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 cards
Shell
curl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
JSON
{
  "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:

Shell
curl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/tcp-address" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
JSON
{
  "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.

A 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:

Shell
curl "https://api.coritan.com/api/v1/orgs/acme/portal/servers/$SERVER_UUID/web-address/availability?name=My%20Bot" \
  -H "Authorization: Bearer $CUSTOMER_TOKEN"
JSON
{"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.

Shell
curl -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.

Shell
curl -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.

A customer adds a full name, such as www.example.com, once the web address is on:

Shell
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 DNS

When 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:

JSON
{
  "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.

Otherwise the domain is pending, with dns.mode set to cname, and dns.record is the record the customer publishes at their DNS host:

JSON
{
  "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:

DNS
www.example.com.  CNAME  harbor-bot.example.gg.

When the customer says the record is published, check it:

Shell
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.

Shell
curl -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.

Shell
curl -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.

Shell
curl -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:

JSON
{
  "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:

Shell
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.

The 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.

We 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.

A 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 addresses

When 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.

A 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.

404 with Web addresses are not available here. or TCP 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 offered is false.
403 with Only 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. and Only the server's owner can remove a TCP address. Hide the forms when can_manage is false.
409 with That 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.
422 with Use 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. and Enter a name. Show the sentence under the field.
409 with This server already has a web address. or This server already has a TCP address.
A server has one of each. Remove it to take another name.
409 with This server has no port yet. Add a port, then try again.
The server has no port to forward to. Add one as Ports describes.
422 with Port 25590 is not one of this server's ports.
Send a port from ports in 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.
409 with Web addresses are not ready here yet. Try again later.
Coritan does not host the DNS of your web domain yet. Contact support.
409 with This 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.
409 with Turn 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.
403 with A server can have 5 of your own domains. Remove one, then add this one.
The server holds max_domains domains. One that waits for its DNS counts.
422 with Use 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.
422 with www.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.
422 with The 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.
409 with www.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.
409 with example.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, AAAA or CNAME record at the name. They delete it, then add the domain again.
409 with Another 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.error is www.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.
404 with This server has no such domain.
The domain_id is not in this server's domains. Read the state again: a domain that waited 7 days is removed.
422 or 503 with We could not make a TCP address for this server. Try again later.
The address could not be made. Nothing was created. 503 with No 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.
404 with This server has no TCP address.
There is none to remove. Read the state again.
400 when removing a port
A web address forwards to it. See What follows the server.
429 with rate_limited
The customer repeated an action too quickly. Wait for the seconds in Retry-After, then try again.

API operations on this page

MethodPathWhat it does
GET/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-addressThe server's web address and everything a page needs to manage it
POST/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-addressTurn on the server's web address: a free name with HTTPS in front of one of its ports
PATCH/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-addressChange the port the server's web address forwards to
DELETE/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-addressTurn off the server's web address
GET/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-address/availabilityWhether a name is free to take for a web address
POST/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-address/certificateOrder a certificate again for each name that has none
POST/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-address/domainsAdd a domain of your own to the server's web address
DELETE/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-address/domains/{domain_id}Remove one of your own domains from the server's web address
POST/api/v1/orgs/{org_slug}/portal/servers/{uuid}/web-address/domains/{domain_id}/verifyCheck a pending domain's DNS now
GET/api/v1/orgs/{org_slug}/portal/servers/{uuid}/tcp-addressThe server's TCP address, and what you need to make one
POST/api/v1/orgs/{org_slug}/portal/servers/{uuid}/tcp-addressMake the server's TCP address
DELETE/api/v1/orgs/{org_slug}/portal/servers/{uuid}/tcp-addressRemove the server's TCP address