Change website domain
Changes the primary domain for an Agency Plan website. Provide the current domain in the path and the new domain in the request body. Set domain to null to revert to the temporary domain.
Changes the primary domain for an Agency Plan website.
Provide the current domain in the path and the new domain in the request body. Set domain to null to revert to the temporary domain.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
website_uidstringRequiredExample:
Agency Plan website UID
zpwlGlp19from_domainstringRequiredExample:
Current domain name to change from
old.example.comBody
domainstring · nullableRequiredExample:
New domain to assign to the website. Set to null to revert to the temporary domain.
new.example.comResponses
200
Success empty response
application/json
messagestringOptionalExample:
Request accepted401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
put/api/agency-hosting/v1/websites/{website_uid}/domains/{from_domain}
PUT /api/agency-hosting/v1/websites/{website_uid}/domains/{from_domain} HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"domain": "new.example.com"
}{
"message": "Request accepted"
}Last updated
Was this helpful?