Skip to content

Add a custom domain

POST/v1/vms/{uid}/domains

Registers a custom domain for the VM's app URL. The domain starts as pending. Nothing is routed until you verify it.

To verify, create two DNS records at your DNS provider, then call Verify a custom domain:

  • A CNAME record for the domain pointing to the VM's app_hostname.
  • A TXT record at rumpty-challenge.<domain_name> whose value is the returned verification_txt.

Root (apex) domains such as acme.com are not supported yet. Use a subdomain such as www.acme.com. A domain can only be registered once across RumptyCloud.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The VM's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Request body

domain_namestringRequired

Fully qualified subdomain to attach. Lowercased and trimmed. Must contain only letters, digits, hyphens and dots, and end in a TLD of at least two letters.

Response

201

The domain was added in pending state.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the custom domain.

vm_uidstring

UID of the VM the domain is attached to.

vm_app_uidstring

Deprecated. Same value as vm_uid (it holds the VM's UID, not a VM app's). Use vm_uid.

domain_namestringRequired

The custom domain.

statusstringRequired

pending until verified and routed, active once traffic is served, failed when DNS verification or routing failed (see last_error).

One ofpendingverifiedactivefailed

verification_txtstringRequired

Value to publish in a TXT record at rumpty-challenge.<domain_name>.

last_errorstring

Reason for the last failure. Omitted when there is none.

created_atstring (date-time)Required

When the domain was added.

Errors

StatusMeaning
400Validation failed: invalid request, domain name is required, invalid domain name format, or the domain is a root domain.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.
409The domain is already registered.

Errors use the standard error format.