Look up the organization an active custom domain belongs to
const url = 'https://api.modeldesk.io/public/hosts/begrippen.example.nl';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.modeldesk.io/public/hosts/begrippen.example.nlFor the app’s proxy, to route a request on a custom domain. Answers for a host that is an ACTIVE domain of an organization on effective custom hosting that can publish under the public contract, and the shared 404 for every other host. Letter case and a port on the host are ignored. Discloses only what the organization’s public pages already show. Needs no sign-in and reads no principal; GET only. Hit and miss both send Cache-Control: public, max-age=60, so a domain put in or taken out of service is routed within a minute.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
begrippen.example.nlResponses
Section titled “Responses”The organization serving the host.
Which organization an active custom domain belongs to, for the proxy to route a request on that host.
object
The organization’s slug, its address on the shared catalog host.
The active domain that carries the organization page.
Every active domain, the primary among them, sorted.
The namespaces the organization publishes under, oldest first.
A namespace an organization publishes under.
object
An absolute http(s) IRI prefix ending in /, as the administrator registered it.
Whether this namespace’s candidate wins a cross-namespace ambiguity at resolve time.
Example generated
{ "orgSlug": "example", "primaryDomain": "example", "domains": [ "example" ], "namespaces": [ { "iriPrefix": "example", "isDefault": true } ]}Headers
Section titled “Headers”Example
public, max-age=60No organization serves this host. The same body as every other public 404, with Cache-Control: public, max-age=60.
An RFC 9457 problem document, always sent as application/problem+json.
object
Present only on a typed refusal, whose own schema requires it and fixes its value. An untyped problem omits it, which RFC 9457 defines as about:blank: the status and title are all there is to branch on.
The path of the request that was refused. Absent when the request was refused before it reached the application’s handlers: a 401 for a missing or unusable access token, and a 403 for a service account whose scopes do not reach the route.
Present on a 400 raised by request-body validation, and on a 422 that refuses named fields (a malformed slug or namespace prefix). Each entry names the rejected property, so a client can attach the message to the field that caused it rather than showing one error for the whole form.
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "example", "violations": [ { "property": "example", "message": "example" } ]}