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

Start website setup

Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously.

Start website setup

post

Starts a website setup on a Web or Cloud hosting order and returns the created setup right away; the website itself is provisioned asynchronously. Poll the list website setups endpoint (hosting_websites_list-setups) with the domain filter every 10 to 15 seconds and wait for status: completed before uploading files, deploying or creating databases.

Omit type for an empty website. type: wordpress installs WordPress in the website root with the admin user, email and password from wordpress, the domain as the site title, and en_US when wordpress.language is omitted. The headless types (headless_empty, headless_wordpress, headless_ecommerce, headless_pocketbase) create a headless website; headless_wordpress additionally installs WordPress into the cms directory of the website root with generated credentials. headless_pocketbase marks the website as a headless PocketBase website but installs nothing: create its PocketBase backend with Create PocketBase backend (POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase) once the setup is completed. headless_empty installs nothing either: WordPress can be added later through POST /api/hosting/v1/accounts/{username}/wordpress/installations (wordpress_installations_install) with type: headless, or a PocketBase backend through the same PocketBase endpoint.

Omit domain to set the website up on a generated temporary free subdomain; the created setup returns it as domain. REST clients that need to know the free subdomain before the call, so a timed-out call can be looked up and retried on the same domain, can generate one through POST /api/hosting/v1/domains/free-subdomains and send it as domain. It is accepted for 24 hours, only from the client that generated it.

When the order has no hosting account yet, the setup creates one first, in the datacenter given by datacenter_code or the order's default datacenter when it is omitted. Returns 404 when the order does not exist or is not accessible to the authenticated client, and 409 with a Retry-After header while a setup for the same domain is still running.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
order_idintegerRequired

Hosting order ID. List orders to find available IDs.

Example: 12345
Body

Website type, domain and WordPress settings for a new website setup

typestring · enum · nullableOptional

Website type. Omit or null for an empty website. wordpress installs WordPress in the website root and requires wordpress. The headless types (headless_empty, headless_wordpress, headless_ecommerce, headless_pocketbase) create a headless website; headless_wordpress additionally installs WordPress into the cms directory with generated credentials. headless_pocketbase only marks the website as a headless PocketBase website: create the backend afterwards with Create PocketBase backend (POST /api/hosting/v1/accounts/{username}/websites/{domain}/pocketbase). headless_empty installs nothing, so WordPress can be added later through POST /api/hosting/v1/accounts/{username}/wordpress/installations (wordpress_installations_install) with type: headless, or a PocketBase backend through the PocketBase endpoint.

Example: wordpressPossible values:
domainstring · max: 255 · nullableOptional

Customer-owned domain. Omit or null to set the website up on a generated temporary free subdomain. Cannot start with "www." and can have at most one subdomain level, e.g. blog.example.com. A free subdomain generated through POST /api/hosting/v1/domains/free-subdomains in the last 24 hours is also accepted.

Example: example.com
datacenter_codestring · nullableOptional

Datacenter for the hosting account when the order does not have one yet. Omit to use the order's default datacenter. Ignored when the order already has a hosting account. List available datacenters to find valid codes.

Example: us-east-1
Responses
201

Created response

application/json
domainstringRequired

Domain of the website being set up.

Example: example.com
usernamestringRequired

Hosting account username.

Example: u123456789
typestring · nullableOptional

Website type requested for the setup: wordpress, headless_empty, headless_wordpress, headless_ecommerce or headless_pocketbase. null for an empty website. Setups started outside this API may report other legacy types.

Example: wordpress
statusstring · enumRequired

running while the website is still being set up, completed once the setup has finished, failed when it stopped before finishing or has not reported progress for over an hour.

Example: runningPossible values:
created_atstring · date-timeRequired

When the setup was requested.

Example: 2024-01-15T10:30:00.000000Z
updated_atstring · date-timeRequired

When the setup last reported progress.

Example: 2024-01-15T10:32:00.000000Z
post/api/hosting/v1/orders/{order_id}/onboardings
POST /api/hosting/v1/orders/{order_id}/onboardings HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 213

{
  "type": "wordpress",
  "domain": "example.com",
  "datacenter_code": "us-east-1",
  "wordpress": {
    "language": "en_US",
    "is_ai_builder": false,
    "admin": {
      "user": "site_admin",
      "password": "S3curePass123",
      "email": "admin@example.com"
    }
  }
}
{
  "domain": "example.com",
  "username": "u123456789",
  "type": "wordpress",
  "status": "running",
  "created_at": "2024-01-15T10:30:00.000000Z",
  "updated_at": "2024-01-15T10:32:00.000000Z"
}

Last updated

Was this helpful?