Register a custom domain
const url = 'https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/catalog/domains';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"domain":"begrippen.example.nl"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.modeldesk.io/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/catalog/domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "domain": "begrippen.example.nl" }'Registers a host the organization owns, PENDING_DNS, with a fresh verification token. The answer names the TXT record to publish (verificationRecordName, a label _modeldesk under the domain, so it survives the CNAME the domain gets later) and what it has to read (verificationRecordValue). The host is a lowercase name of at least three labels, without scheme, user name, port, path, query or fragment; a host the platform answers on or an IP address is refused as 422 on the field domain. Several organizations may register one host; the first whose TXT record is found claims it. A host another organization has claimed is refused with This domain cannot be registered., which does not say who holds it. The certificate source is PLATFORM: the edge’s managed certificate, issued when the domain is bound. Requires an administrator of the organization.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
The host only, a subdomain the organization owns: at least three labels, no scheme, user name, port, path, query or fragment. Stored in lowercase.
Example
begrippen.example.nlResponses
Section titled “Responses”Registered, pending its DNS record.
object
The lowercase host.
Where a domain is in its lifecycle. PENDING_DNS until the verification record is found (re-check), VERIFIED until ops bind the host at the edge and activate it, ACTIVE while it serves, INACTIVE once ops, the organization, a lapsed subscription or an erasure took it out of service. An INACTIVE domain whose record is still in DNS can be re-checked to VERIFIED and activated again.
Whether this is the organization’s primary domain. Only meaningful while ACTIVE: the effective hosting takes the active domain marked primary, else the oldest active one.
The random token the verification record carries.
The owner of the TXT record to publish, _modeldesk.{domain}.
What the TXT record has to read, modeldesk-verify={verificationToken}.
Who issues the domain’s TLS certificate. PLATFORM is the edge’s managed certificate, the only source available; CUSTOMER is reserved for an uploaded certificate and cannot be chosen yet.
Set once a certificate is bound; absent until then.
Set once a certificate is bound; absent until then.
Example
{ "status": "PENDING_DNS", "verificationRecordName": "_modeldesk.begrippen.example.nl", "certificateSource": "PLATFORM"}The caller is not an administrator of the organization.
No such organization.
The host cannot be a custom domain, another organization claimed it, or this one has it already; the violation names the field.
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" } ]}default
Section titled “default”Error
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" } ]}