For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create website

Create a new website for the authenticated client.

Create website

post

Create a new website for the authenticated client.

Provide the domain name and associated order ID to create a new website. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter.

Subsequent websites will be hosted on the same datacenter automatically.

Website creation takes up to a few minutes to complete. Check the websites list endpoint to see when your new website becomes available.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
domainstringRequired

Domain name for the website. Cannot start with "www."

Example: example.com
order_idintegerRequired

ID of the associated order

Example: 12345
datacenter_codestring · nullableOptional

Datacenter code. This parameter is required when creating the first website on a new hosting plan.

Example: us-east-1
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
post/api/hosting/v1/websites
POST /api/hosting/v1/websites HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "domain": "example.com",
  "order_id": 12345,
  "datacenter_code": "us-east-1"
}
{
  "message": "Request accepted"
}

Last updated

Was this helpful?