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
Request
- Base URL: https://developers.hostinger.com
- URL: https://developers.hostinger.com/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains
- Auth: HTTP bearer
Path parameters
usernamestring required
Example:u123456789
domainstring required
Example:mydomain.tld
Domain name
Request body
Example request
{
"subdomain": "blog",
"directory": "blog",
"is_using_public_directory": true
}Response
Success empty response
Example response
{
"message": "Request accepted"
}Changes
No recorded changes to this operation across all 133 revisions of this API.