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

Create a new website

Provisions a new website on one of your Agency Plan hosting orders.

Create a new website

post

Provisions a new website on one of your Agency Plan hosting orders.

Choose the datacenter, stack (flavor), and PHP version for the site. Optionally attach your own domain — omit it, set it to null, or leave it unavailable and a free *.hostingersite.com subdomain is generated instead — and/or install WordPress by supplying the wordpress details (admin account, site title, and language).

Common setups:

  • Plain PHP site: flavor set to php-fpm, with settings.php.version; omit wordpress and type.
  • WordPress site: flavor set to the desired WordPress version (e.g. wp-7.0), plus the wordpress block (admin account, title, language).
  • Static/Node.js frontend app: flavor set to php-fpm and type set to node-static.

Provisioning runs in the background, so the response returns immediately with a setup UUID that identifies the job. The new website becomes reachable once provisioning finishes.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
order_idintegerRequired

Agency Plan order ID

Example: 123456
Body

Create a new Agency Plan website setup on the given order

datacenter_codestringRequired

Datacenter code where the website should be provisioned. Available codes depend on live capacity and are not a fixed set.

Example: us-east
flavorstringRequired

Setup flavor: a specific WordPress version in the format wp-<major>.<minor> or wp-<major>.<minor>.<patch> (e.g. wp-6.8.2), or php-fpm for a plain PHP stack. Generic versions like wp-latest are not allowed.

Example: wp-6.8.2Pattern: ^(wp-[0-9]+(\.[0-9]+){1,2}|php-fpm)$
domainstring · nullableOptional

Primary domain to attach to the website. Omit or set to null to get a free auto-generated *.hostingersite.com subdomain instead.

Example: example.com
typestring · enum · nullableOptional

Website type

Example: node-staticPossible values:
Responses
200

Success response

application/json
setup_uuidstringOptional

UUID tracking the asynchronous website setup process

Example: 0193b6d4-fabb-70e0-8ea4-cfe060a45898
post/api/agency-hosting/v1/orders/{order_id}/websites/setups
POST /api/agency-hosting/v1/orders/{order_id}/websites/setups HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 262

{
  "datacenter_code": "us-east",
  "flavor": "wp-6.8.2",
  "settings": {
    "php": {
      "version": "8.3"
    }
  },
  "domain": "example.com",
  "type": "node-static",
  "wordpress": {
    "language": "en_US",
    "title": "My Blog",
    "admin": {
      "user": "admin",
      "password": "S3cureP@ssw0rd",
      "email": "admin@example.com"
    }
  }
}
{
  "setup_uuid": "0193b6d4-fabb-70e0-8ea4-cfe060a45898"
}

Last updated

Was this helpful?