---
title: "Create site"
method: POST
path: "/orgs/{organization}/servers/{server}/sites"
tags: ["Sites"]
---

# Create site

`POST /orgs/{organization}/servers/{server}/sites`

Add a new site to the server.

Processing mode: <small><code>async</code></small>

## Path parameters

- `organization` string, required
- `server` integer, required

## Request body

- CreateSiteRequest
  - `type` 'laravel' | 'symfony' | 'statamic' | 'wordpress' | 'phpmyadmin' | 'php' | 'nextjs' | 'nuxtjs' | 'static-html' | 'other' | 'custom', required
  - `domain_mode` union
    - string
    - 'on-forge' | 'custom'
  - `name` union
    - string
    - string
  - `www_redirect_type` 'from-www' | 'to-www' | 'none'
  - `allow_wildcard_subdomains` boolean — Whether to allow wildcard subdomains for the domain.
  - `root_directory` string, nullable
  - `web_directory` string, nullable
  - `is_isolated` boolean
  - `isolated_user` string
  - `php_version` 'php5' | 'php56-old' | 'php56' | 'php70' | 'php71' | 'php72' | 'php73' | 'php74' | 'php80' | 'php81' | 'php82' | 'php83' | 'php84' | 'php85'
  - `zero_downtime_deployments` boolean
  - `nginx_template_id` integer
  - `source_control_provider` 'github' | 'gitlab' | 'bitbucket' | 'gitlab-custom' | 'custom' — All supported source control providers.
  - `source_control_provider_id` integer, nullable
  - `repository` string, nullable
  - `branch` string, nullable
  - `database_id` integer — The ID of the database to use with the site.
  - `database_user_id` integer — The ID of the database user to use with the site.
  - `statamic_setup` string — The type of setup for Statmic apps.
  - `statamic_starter_kit` string — The starter kit for the Statamic app.
  - `statamic_super_user_email` string, email
  - `statamic_super_user_password` string, nullable
  - `install_composer_dependencies` boolean
  - `generate_deploy_key` boolean
  - `public_deploy_key` string
  - `private_deploy_key` string
  - `frontend_package_manager` string — The package manager for frontend applications.
  - `frontend_build_command` string — The build command for frontend assets.
  - `nuxt_next_mode` string — The render mode for Next/Nuxt applications.
  - `nuxt_next_port` integer — The port used for Next/Nuxt applications.
  - `push_to_deploy` boolean — Automatically trigger a new deployment when changes are pushed to the environment's Git branch.
  - `tags` string[], nullable
  - `shared_paths` object[] — A list of files or directories to be shared between releases for zero-downtime deployments.
    - `from` string, required — The path relative to the project's root directory on the server that should be shared between releases.
    - `to` string, required — The path relative to the deployment's release directory that the shared path should be linked to.

## Response `202`

`SiteResource`

## Other responses

- `403` — Authorization error
- `404` — Not found
- `422` — Validation error

---

[API](https://skmtc.dev/mfullbrook/apis/forge.md) · [All operations](https://skmtc.dev/mfullbrook/apis/forge/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mfullbrook/forge/revisions/24ad66d99f93/schema)
