custom_domain_claimed
409: Hostname already taken. The hostname is already held by another Org, or by another Identity of this Org.
Hostname already taken. Answered with 409.
What it means
The hostname is already held by another Org, or by another Identity of this Org. Another Org holds it once it is serving a Tunnel there, which means that Org proved control of it: the proof is the tokenised _acme-challenge record, and one name carries exactly one of those, so a second Org can never prove the same hostname while the first holds it. Asking for a hostname nobody has proved yet is not refused: two Orgs may both hold it pending. Within one Org a hostname serves one Identity, so a hostname the Org holds on a different Identity is refused whatever its status, rather than answered as if it were this Identity's.
What to do
Whoever holds the hostname has to remove it first. If it is another Identity of this Org, GET /api/custom-domains names it; if it is you in another Org, delete it there. Either way with DELETE /api/identities/{handle}/custom-domains/{hostname}.
The body
{
"type": "https://tigby.eu/problems/custom_domain_claimed",
"title": "Hostname already taken",
"status": 409,
"detail": "…what was refused, naming this request's own values",
"code": "custom_domain_claimed",
"doc_url": "https://docs.tigby.eu/errors/custom_domain_claimed",
"agent_hint": "…the next step, for software"
}Branch on code. The detail names this request's own Handle, id or limit and is not part of the contract.