Get your free beta license ↗
API operation · domains group
POST

/domains/{name}/aliases

First published 3 Oct 20260.1.0Unchanged since publication

Add an alias to a domain

Who may call it
AdministratorResellerCustomer
Token scope, any of
domainsall
Answers201 Created

Apache serves the domain name and the alias from the same document root. UrbeStack updates DNS and mail configuration and returns the updated aliases list. The alias must be unique among domains and aliases on this server.

Only administrators can add reserved aliases, 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 aliases above or below another account's domain or alias, names whose zones this server holds for DNS clients, and names that overlap another server's zone in the DNS distribution network. When mail.unpointed_domains is set to refuse, the alias must already point to this server unless the caller is an administrator.

An unknown domain returns 404. Access to an existing domain is limited to administrators, the domain owner and the owner's reseller. Other callers receive 403.

As a command

Run as root on the server

Parameters

namepath ·DomainNameRequired

Request body

JSON ·AliasCreate· 1 field
nameDomainNameRequired
A domain name is case-insensitive and stored in lowercase.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/domains/example.com/aliases" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "example.com"
  }'
Response · 201 Created
{
  "aliases": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "id": 1,
      "name": "alice"
    }
  ]
}

Errors

13 errors, each a status and a sentence
400Domain name required
400Domain name too long
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid domain name
400Invalid port
400Invalid setting key
401Authentication required
403Insufficient privileges
404Domain '<name>' not found
404Setting '<key>' not found
409'<alias>' is already a domain here
409'<alias>' is already an alias
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-domains-name-aliases/