---
title: "Create new site"
method: POST
path: "/v1/sites"
tags: ["Sites"]
---

# Create new site

`POST /v1/sites`

Endpoint that can be used to create a new site.

## Request body

- CreateSiteRequest
  - `name` string, required — WordPress Site Title
  - `location` integer — ID of the location. Use the List Site locations API to get the location ID.
  - `restricted_location` integer — If you have dedicated locations, you can use these by ID to add sites at those dedicated locations. (When passed, do not pass location). Use the List Site locations API to get the restricted location ID.
  - `admin_username` string — WordPress admin username
  - `admin_password` string — WordPress admin password
  - `admin_email` string — WordPress admin email
  - `multisite` boolean — If the site will use WordPress Multisite: https://wordpress.org/documentation/article/wordpress-glossary/#multisite
  - `template_id` string, uuid — An optional Site Template ID to use when creating the site
  - `install_plugins` string — A comma separated list of plugin slugs to install
  - `sub_path` string — If the site should be installed outside of public_html, which folder (this is rare)
  - `label` string, nullable — A label which can be used to identify the site separately from the site's domain
  - `site_type` 0 | 1 | 2 — Type of site. 0 == WordPress, 1 == static site
  - `static_site` boolean — DEPRECATED: Use site_type instead. When true, a "static" site will be created without any WordPress install
  - `metadata` SiteMetadata
  - `php_version` string — PHP version to be used
  - `template_replacements` TemplateReplacement[] — If this site is being created from a template, pass keys and values here and they will be replaced in the site's database
    - `key` string — Key which is already present in the database and should be replaced with value
    - `value` string — Value which the key will be set to

## Response `200`

OK

- CreateSiteResponse
  - `success` boolean — whether the request succeeded
  - `errors` string[]
  - `messages` string[], nullable
  - `result` object
    - `id` integer
    - `domain` string

## Other responses

- `400` — Bad Request
- `401` — Authentication failed
- `403` — Not authorized to access endpoint
- `404` — Given site not found for user
- `405` — Invalid input
- `500` — Internal error

---

[API](https://skmtc.net/rocket/apis/rocket-net-api.md) · [All operations](https://skmtc.net/rocket/apis/rocket-net-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rocket/rocket-net-api/versions/db0dcbbc5764/schema)
