v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03269339953.6 KB
Hosting: Domains

Create website subdomain

Create a new subdomain for the selected website.

Provide a subdomain prefix and, optionally, a custom directory or the website public directory to use as the subdomain root.

post/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains

Path parameters

usernamestring required
Example:u123456789
domainstring required
Example:mydomain.tld

Domain name

Request body

subdomainstring required

Subdomain prefix to create under the selected website

directorystring nullable

Directory name for the subdomain relative to the website root

is_using_public_directoryboolean

Use the website public directory as the subdomain root directory

Example request

{
  "subdomain": "blog",
  "directory": "blog",
  "is_using_public_directory": true
}

Response

Success empty response

messagestring

Example response

{
  "message": "Request accepted"
}