Create website
Changed onDeprecated: use POST /api/hosting/v1/orders/{order_id}/onboardings (start website setup) instead. It takes the same domain and datacenter_code, can also install WordPress, and returns the created setup.
Create a new website for the authenticated client.
You must choose which hosting order to create this website on. Pass that order as order_id together with the domain name. List orders to see available IDs; the website is provisioned on that order's hosting plan.
Only Web and Cloud hosting orders are accepted. To create a website on an Agency Plan order, use POST /api/agency-hosting/v1/orders/{order_id}/websites/setups.
When the order has no hosting account yet, a new hosting account is set up first, in the datacenter given by datacenter_code or the order's default datacenter when it is omitted. Subsequent websites will be hosted on the same datacenter automatically.
Website creation is asynchronous and takes up to a few minutes. Poll the list website setups endpoint with the domain filter every 10 to 15 seconds and wait for status: completed before uploading files, deploying or creating databases. While the setup is running, endpoints that operate on the website may respond with 404 or 409. is_enabled on the websites list reflects suspension, not readiness.
Request
- Base URL: https://developers.hostinger.com
- URL: https://developers.hostinger.com/api/hosting/v1/websites
- Auth: HTTP bearer
Request body
Example request
{
"domain": "example.com",
"order_id": 12345,
"datacenter_code": "us-east-1"
}Response
Success empty response
Example response
{
"message": "Request accepted"
}Changes
- info
endpoint deprecated
- info
added the non-success response with the status
- info