/domains
0.1.0Unchanged since publicationAdd a hosted domain
domainsallUrbeStack creates the document root, Apache virtual host and PHP-FPM pool, and updates DNS and mail configuration. The response contains the new domain in domain. The user field selects the owner and defaults to the signed-in user's account. The name must be unique among domains and aliases on this server.
To add a subdomain, set parent to a standalone domain owned by the same customer. The new name must be below the parent's name in DNS. Subdomains count toward the customer's package limit for domains and are deleted with their parent.
If you specify php_version, such as 8.4, select an installed version that is available for new domains. Wait for any PHP installation to finish before selecting a version. The Apache virtual host template defaults to default. Supplying a nonempty template as a reseller or customer returns 403.
Only administrators can use reserved names, the server's own names, names above or below the server's own names, or names in the server's own DNS zones. The same restriction applies to names above or below another account's domain or alias and names that overlap another server's zone in the DNS distribution network. If this server holds the name's zone for a DNS client, an administrator's request takes over the zone for the new domain and blocks further updates from that client.
When mail.unpointed_domains is set to refuse, the name must already point to this server unless the request specifies a parent or comes from an administrator.
As a command
Run as root on the servernameDomainNameRequiredparentDomainNamephp_versionstring, matching ^[5-9]\.[0-9]$templatestring, matching ^[a-z][a-z0-9-]{0,31}$userUsernameExample
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/domains" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "example.com",
"parent": "example.com",
"php_version": "8.4",
"template": "default",
"user": "alice"
}'201 Created{
"domain": {
"bandwidth_cut": true,
"created_at": "2026-09-09T10:15:00Z",
"directory_listing": true,
"docroot": "/home/alice/files/web/example.com/public_html",
"error_pages": true,
"id": 1,
"move_state": "text",
"name": "example.com",
"package": "basic",
"parent": "example.com",
"php_effective": {},
"php_settings": {},
"php_version": "8.4",
"ssl": {},
"stats_enabled": true,
"status": "active",
"template": "default",
"user": "alice",
"user_id": 2,
"wildcard": true,
"www_alias": true,
"www_redirect": "none"
}
}Errors
27 errors, each a status and a sentence400<_> is set per domain, on the PHP page's Domains tab, never as a server default400A subdomain belongs to the same user as its parent400A subdomain cannot have a subdomain as its parent400Domain name required400Domain name too long400Domains belong to users with role 'user'400Invalid IPv4 address400Invalid IPv6 address400Invalid PHP version, expected e.g. 8.2400Invalid domain name400Invalid port400Invalid setting key400Invalid status400Invalid template name400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400PHP settings must be an object of setting: value400Subdomain '<name>' does not sit under '<parent.name>'400Unknown PHP version '<version>'400Username '<value>' is reserved401Authentication required403The virtual host template is set by an administrator404Parent domain '<parent>' not found404Setting '<key>' not found404User '<owner>' not found409'<name>' is already an alias here409Domain '<name>' already exists409The package <p.name> allows <limit> urbestack.com/docs/api/post-domains/