> ## Documentation Index
> Fetch the complete documentation index at: https://forge.laravel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create site

> Add a new site to the server.

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



## OpenAPI

````yaml https://forge.laravel.com/api/docs.openapi post /orgs/{organization}/servers/{server}/sites
openapi: 3.1.0
info:
  title: Forge
  version: 0.0.1
  description: Laravel Forge - API Documentation
servers:
  - url: https://forge.laravel.com/api
security:
  - http: []
  - oauth2: []
tags:
  - name: Roles
  - name: Sites
  - name: Organizations
  - name: Storage Providers
  - name: Recipes
  - name: Servers
  - name: Background Processes
  - name: Nginx
  - name: Databases
  - name: Backups
  - name: Monitors
  - name: Firewall Rules
  - name: Logs
  - name: SSH Keys
  - name: Scheduled Jobs
  - name: Security Rules
  - name: Redirect Rules
  - name: Integrations
  - name: Deployments
  - name: Commands
  - name: Teams
  - name: Server Credentials
  - name: User
  - name: Providers
paths:
  /orgs/{organization}/servers/{server}/sites:
    post:
      tags:
        - Sites
      summary: Create site
      description: |-
        Add a new site to the server.

        Processing mode: <small><code>async</code></small>
      operationId: organizations.servers.sites.store
      parameters:
        - name: organization
          in: path
          required: true
          description: The organization slug
          schema:
            type: string
        - name: server
          in: path
          required: true
          description: The server ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSiteRequest'
      responses:
        '202':
          description: '`SiteResource`'
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SiteResource'
                  included:
                    type: array
                    items:
                      anyOf:
                        - $ref: '#/components/schemas/ServerResource'
                        - $ref: '#/components/schemas/TagResource'
                        - $ref: '#/components/schemas/DeploymentResource'
                        - $ref: '#/components/schemas/SecurityRuleResource'
                        - $ref: '#/components/schemas/RedirectRuleResource'
                required:
                  - data
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
      security:
        - oauth2:
            - site:create
components:
  schemas:
    CreateSiteRequest:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/SiteType'
        domain_mode:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/CreateSiteDomainMode'
        name:
          anyOf:
            - type: string
            - type: string
        www_redirect_type:
          $ref: '#/components/schemas/WwwRedirectType'
          description: The type of `www` redirection to apply to the domain.
          example: from-www
        allow_wildcard_subdomains:
          type: boolean
          description: Whether to allow wildcard subdomains for the domain.
          example: false
        root_directory:
          type:
            - string
            - 'null'
          pattern: ^[^\s]+$
        web_directory:
          type:
            - string
            - 'null'
          pattern: ^[^\s]+$
        is_isolated:
          type: boolean
        isolated_user:
          type: string
          pattern: ^[a-z][\-a-z0-9_]*$
          maxLength: 32
        php_version:
          $ref: '#/components/schemas/PhpVersion'
        zero_downtime_deployments:
          type: boolean
        nginx_template_id:
          type: integer
        source_control_provider:
          $ref: '#/components/schemas/SourceControlProvider'
        source_control_provider_id:
          type:
            - integer
            - 'null'
        repository:
          type:
            - string
            - 'null'
        branch:
          type:
            - string
            - 'null'
        database_id:
          type: integer
          description: The ID of the database to use with the site.
        database_user_id:
          type: integer
          description: The ID of the database user to use with the site.
        statamic_setup:
          type: string
          description: The type of setup for Statmic apps.
        statamic_starter_kit:
          type: string
          description: The starter kit for the Statamic app.
        statamic_super_user_email:
          type: string
          format: email
        statamic_super_user_password:
          type:
            - string
            - 'null'
        install_composer_dependencies:
          type: boolean
        generate_deploy_key:
          type: boolean
        public_deploy_key:
          type: string
        private_deploy_key:
          type: string
        frontend_package_manager:
          type: string
          description: The package manager for frontend applications.
        frontend_build_command:
          type: string
          description: The build command for frontend assets.
        nuxt_next_mode:
          type: string
          description: The render mode for Next/Nuxt applications.
        nuxt_next_port:
          type: integer
          description: The port used for Next/Nuxt applications.
        push_to_deploy:
          type: boolean
          description: >-
            Automatically trigger a new deployment when changes are pushed to
            the environment's Git branch.
          default: false
        tags:
          type:
            - array
            - 'null'
          items:
            type: string
        shared_paths:
          type: array
          description: >-
            A list of files or directories to be shared between releases for
            zero-downtime deployments.
          items:
            type: object
            properties:
              from:
                type: string
                description: >-
                  The path relative to the project's root directory on the
                  server that should be shared between releases.
              to:
                type: string
                description: >-
                  The path relative to the deployment's release directory that
                  the shared path should be linked to.
            required:
              - from
              - to
      required:
        - type
      title: CreateSiteRequest
    SiteResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - sites
        attributes:
          type: object
          properties:
            name:
              type: string
            status:
              $ref: '#/components/schemas/SiteStatus'
            url:
              type: string
            user:
              type: string
            https:
              type: boolean
            web_directory:
              type: string
            root_directory:
              type:
                - string
                - 'null'
            aliases:
              type: array
              items: {}
            php_version:
              type: string
            deployment_status:
              type: string
            quick_deploy:
              type:
                - boolean
                - 'null'
            isolated:
              type: boolean
            shared_paths:
              type: object
              description: '* The linked directories for the site.'
              additionalProperties:
                type: string
            repository:
              type: object
              properties:
                provider:
                  type: string
                url:
                  type:
                    - string
                    - 'null'
                branch:
                  type:
                    - string
                    - 'null'
                status:
                  anyOf:
                    - $ref: '#/components/schemas/RepositoryStatus'
                    - type: 'null'
              required:
                - provider
                - url
                - branch
                - status
            database:
              type:
                - string
                - 'null'
            maintenance_mode:
              type: object
              properties:
                enabled:
                  type: boolean
                status:
                  anyOf:
                    - $ref: '#/components/schemas/MaintenanceModeStatus'
                    - type: 'null'
              required:
                - enabled
                - status
            zero_downtime_deployments:
              type: boolean
            deployment_script:
              type:
                - string
                - 'null'
            wildcards:
              type:
                - boolean
                - 'null'
            app_type:
              anyOf:
                - $ref: '#/components/schemas/AppType'
                - type: string
                  enum:
                    - Custom
            uses_envoyer:
              type: boolean
            deployment_url:
              type: string
            healthcheck_url:
              type:
                - string
                - 'null'
            created_at:
              type:
                - string
                - 'null'
              format: date-time
            updated_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - name
            - status
            - url
            - user
            - https
            - web_directory
            - root_directory
            - aliases
            - php_version
            - deployment_status
            - quick_deploy
            - isolated
            - shared_paths
            - repository
            - database
            - maintenance_mode
            - zero_downtime_deployments
            - deployment_script
            - wildcards
            - app_type
            - uses_envoyer
            - deployment_url
            - healthcheck_url
            - created_at
            - updated_at
        relationships:
          type: object
          properties:
            server:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/ServerResourceIdentifier'
                    - type: 'null'
              required:
                - data
            tags:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/TagResourceIdentifier'
              required:
                - data
            latestDeployment:
              type: object
              properties:
                data:
                  anyOf:
                    - $ref: '#/components/schemas/DeploymentResourceIdentifier'
                    - type: 'null'
              required:
                - data
            securityRules:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/SecurityRuleResourceIdentifier'
              required:
                - data
            redirectRules:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/RedirectRuleResourceIdentifier'
              required:
                - data
        links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/Link'
          required:
            - self
      required:
        - id
        - type
        - links
      title: SiteResource
    ServerResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - servers
        attributes:
          type: object
          properties:
            id:
              type: integer
            credential_id:
              type:
                - integer
                - 'null'
            name:
              type: string
            slug:
              type: string
            type:
              $ref: '#/components/schemas/ServerType'
              description: The type of server.
              examples:
                - app
            ubuntu_version:
              type:
                - string
                - 'null'
            ssh_port:
              type: integer
            provider:
              type: string
            identifier:
              type:
                - string
                - 'null'
            size:
              type: string
            region:
              type: string
            php_version:
              type:
                - string
                - 'null'
            php_cli_version:
              type:
                - string
                - 'null'
            opcache_status:
              type:
                - string
                - 'null'
            database_type:
              type:
                - string
                - 'null'
            db_status:
              type:
                - string
                - 'null'
            redis_status:
              type:
                - string
                - 'null'
            ip_address:
              type:
                - string
                - 'null'
            private_ip_address:
              type:
                - string
                - 'null'
            revoked:
              type: boolean
            created_at:
              type: string
              format: date-time
              description: The date and time the server was created.
              examples:
                - '2025-07-29T09:00:00Z'
            updated_at:
              type: string
              format: date-time
              description: The date and time the server was last updated.
              examples:
                - '2025-07-30T09:00:00Z'
            connection_status:
              type: string
            timezone:
              type: string
            local_public_key:
              type:
                - string
                - 'null'
            is_ready:
              type: boolean
          required:
            - id
            - credential_id
            - name
            - slug
            - type
            - ubuntu_version
            - ssh_port
            - provider
            - identifier
            - size
            - region
            - php_version
            - php_cli_version
            - opcache_status
            - database_type
            - db_status
            - redis_status
            - ip_address
            - private_ip_address
            - revoked
            - created_at
            - updated_at
            - connection_status
            - timezone
            - local_public_key
            - is_ready
        relationships:
          type: object
          properties:
            tags:
              type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/TagResourceIdentifier'
              required:
                - data
        links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/Link'
          required:
            - self
      required:
        - id
        - type
        - links
      title: ServerResource
    TagResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - tags
        attributes:
          type: object
          properties:
            name:
              type: string
            created_at:
              type: string
              format: date-time
              description: The date and time the tag was created.
              examples:
                - '2025-07-29T09:00:00Z'
            updated_at:
              type: string
              format: date-time
              description: The date and time the tag was last updated.
              examples:
                - '2025-07-30T09:00:00Z'
          required:
            - name
            - created_at
            - updated_at
      required:
        - id
        - type
      title: TagResource
    DeploymentResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - deployments
        attributes:
          type: object
          properties:
            commit:
              type: object
              description: The commit information for the deployment.
              properties:
                hash:
                  type:
                    - string
                    - 'null'
                  description: The commit hash.
                author:
                  type:
                    - string
                    - 'null'
                  description: The commit author.
                message:
                  type:
                    - string
                    - 'null'
                  description: The commit message.
                branch:
                  type:
                    - string
                    - 'null'
                  description: The commit branch.
              required:
                - hash
                - author
                - message
                - branch
            type:
              type: string
            status:
              $ref: '#/components/schemas/DeploymentStatus'
            started_at:
              type: string
              format: date-time
              description: The date and time the deployment started.
              examples:
                - '2025-07-29T09:00:00Z'
            ended_at:
              type: string
              format: date-time
              description: The date and time the deployment ended.
              examples:
                - '2025-07-29T09:00:00Z'
            created_at:
              type: string
              format: date-time
              description: The date and time the deployment was created.
              examples:
                - '2025-07-29T09:00:00Z'
            updated_at:
              type: string
              format: date-time
              description: The date and time the deployment was last updated.
              examples:
                - '2025-07-29T09:00:00Z'
          required:
            - commit
            - type
            - status
            - started_at
            - ended_at
            - created_at
            - updated_at
      required:
        - id
        - type
      title: DeploymentResource
    SecurityRuleResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - securityRules
        attributes:
          type: object
          properties:
            name:
              type: string
              description: The name of the security rule.
              examples:
                - Restricted Access
            path:
              type:
                - string
                - 'null'
              description: The path for the security rule.
              examples:
                - /admin
            status:
              type:
                - string
                - 'null'
              description: The status of the security rule.
              examples:
                - installed
            created_at:
              type: string
              format: date-time
              description: The date and time the security rule was created.
              examples:
                - '2025-07-29T09:00:00Z'
            updated_at:
              type: string
              format: date-time
              description: The date and time the security rule was last updated.
              examples:
                - '2025-07-30T09:00:00Z'
          required:
            - name
            - path
            - status
            - created_at
            - updated_at
        links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/Link'
          required:
            - self
      required:
        - id
        - type
        - links
      title: SecurityRuleResource
    RedirectRuleResource:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - redirect-rules
        attributes:
          type: object
          properties:
            from:
              type: string
              description: The source URL path for the redirect rule.
              examples:
                - /old-path
            to:
              type: string
              description: The destination URL path for the redirect rule.
              examples:
                - /new-path
            type:
              $ref: '#/components/schemas/RedirectRuleType'
              description: The type of the redirect rule.
              examples:
                - permanent
            status:
              type: string
              description: The status of the redirect rule.
              enum:
                - installing
                - installed
                - removing
              examples:
                - installed
            created_at:
              type: string
              format: date-time
              description: The date and time the redirect rule was created.
              examples:
                - '2025-07-29T09:00:00Z'
            updated_at:
              type: string
              format: date-time
              description: The date and time the redirect rule was last updated.
              examples:
                - '2025-07-30T09:00:00Z'
          required:
            - from
            - to
            - type
            - status
            - created_at
            - updated_at
        links:
          type: object
          properties:
            self:
              $ref: '#/components/schemas/Link'
          required:
            - self
      required:
        - id
        - type
        - links
      title: RedirectRuleResource
    SiteType:
      type: string
      enum:
        - laravel
        - symfony
        - statamic
        - wordpress
        - phpmyadmin
        - php
        - nextjs
        - nuxtjs
        - static-html
        - other
        - custom
      title: SiteType
    CreateSiteDomainMode:
      type: string
      enum:
        - on-forge
        - custom
      title: CreateSiteDomainMode
    WwwRedirectType:
      type: string
      enum:
        - from-www
        - to-www
        - none
      title: WwwRedirectType
    PhpVersion:
      type: string
      enum:
        - php5
        - php56-old
        - php56
        - php70
        - php71
        - php72
        - php73
        - php74
        - php80
        - php81
        - php82
        - php83
        - php84
        - php85
      title: PhpVersion
    SourceControlProvider:
      type: string
      description: |
        All supported source control providers.
      enum:
        - github
        - gitlab
        - bitbucket
        - gitlab-custom
        - custom
      title: SourceControlProvider
    SiteStatus:
      type: string
      enum:
        - installed
        - creating
        - removing
        - installing
        - uninstalling
        - deployed
        - never-deployed
        - deploying
        - failed
        - maintenance
      title: SiteStatus
    RepositoryStatus:
      type: string
      enum:
        - installed
        - installing
        - removing
      title: RepositoryStatus
    MaintenanceModeStatus:
      type: string
      enum:
        - disabling
        - enabling
      title: MaintenanceModeStatus
    AppType:
      type: string
      enum:
        - Statamic
        - WordPress
        - phpMyAdmin
        - Laravel
        - Symfony
        - PHP
        - Next.js
        - Nuxt.js
        - Static HTML
        - Custom
        - Craft
        - Minecraft
      title: AppType
    ServerResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - servers
        id:
          type: string
      required:
        - type
        - id
      title: ServerResourceIdentifier
    TagResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - tags
        id:
          type: string
      required:
        - type
        - id
      title: TagResourceIdentifier
    DeploymentResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - deployments
        id:
          type: string
      required:
        - type
        - id
      title: DeploymentResourceIdentifier
    SecurityRuleResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - securityRules
        id:
          type: string
      required:
        - type
        - id
      title: SecurityRuleResourceIdentifier
    RedirectRuleResourceIdentifier:
      type: object
      properties:
        type:
          type: string
          enum:
            - redirect-rules
        id:
          type: string
      required:
        - type
        - id
      title: RedirectRuleResourceIdentifier
    Link:
      type: object
      properties:
        href:
          type: string
          format: uri
        rel:
          type: string
        describedby:
          type: string
        title:
          type: string
        type:
          type: string
        hreflang:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
        meta:
          type: object
      required:
        - href
      title: Link
    ServerType:
      type: string
      enum:
        - app
        - web
        - loadbalancer
        - database
        - cache
        - worker
        - meilisearch
        - openclaw
      title: ServerType
    DeploymentStatus:
      type: string
      enum:
        - cancelled
        - deploying
        - failed
        - failed-build
        - finished
        - pending
        - queued
      title: DeploymentStatus
    RedirectRuleType:
      type: string
      enum:
        - redirect
        - permanent
      title: RedirectRuleType
  responses:
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://forge.laravel.com/oauth/authorize
          tokenUrl: https://forge.laravel.com/oauth/token
          scopes:
            organization:view: Allow members to view the organization
            organization:manage: Allow members to manage the organization
            organization:delete: Allow members to delete the organization
            server:view: Allow members to view servers
            server:create: Allow members to create servers
            server:delete: Allow members to delete servers
            server:archive: Allow members to archive servers
            server:transfer: Allow members to transfer servers to another Forge account
            server:manage-meta: >-
              Allow members to change server settings such as name and IP
              address
            server:manage-packages: >-
              Allow members to configure and remove server and site package
              authentication
            server:manage-php: Allow members to install and change PHP installations
            server:manage-logs: Allow members to clear server and site logs
            server:manage-network: Allow members to change the server‘s firewall
            server:manage-nginx-templates: Allow members to manage Nginx templates
            server:manage-services: Allow members to start, stop and restart services
            server:manage-password: Allow members to reset the sudo password
            server:create-keys: Allow members to add SSH keys to servers
            server:delete-keys: Allow members to remove SSH keys from servers
            server:create-monitors: Allow members to create server monitors
            server:delete-monitors: Allow members to delete server monitors
            server:create-databases: Allow members to create databases and database users
            server:delete-databases: Allow members to delete databases and database users
            server:create-backups: Allow members to create database backup configurations
            server:delete-backups: Allow members to delete database backup configurations
            server:create-daemons: Allow members to create daemons
            server:delete-daemons: Allow members to delete daemons
            server:create-schedulers: Allow members to create scheduled jobs
            server:delete-schedulers: Allow members to delete scheduled jobs
            server:web-terminal: Allow members to start web terminal sessions
            site:create: Allow members to create sites
            site:delete: Allow members to delete sites
            site:meta: >-
              Allow members to update site meta data such as domain name and
              aliases
            site:manage-commands: >-
              Allow members to run arbitrary commands from the site‘s root
              directory
            site:manage-deploys: Allow members to deploy the site and update the deployment script
            site:manage-nginx: Allow members to manage the site‘s Nginx configuration file
            site:manage-project: >-
              Allow members to install Git repositories, phpMyAdmin and
              WordPress applications
            site:manage-environment: Allow members to update the site‘s environment file
            site:manage-notifications: Allow members to configure deployment notifications
            site:manage-queues: Allow members to configure queue workers
            site:manage-redirects: Allow members to configure URL redirects
            site:manage-security: Allow members to configure HTTP Basic Authentication
            site:manage-ssl: Allow members to configure SSL and Let‘s Encrypt certificates
            site:manage-integrations: Allow members to manage site integrations
            site:manage-heartbeats: Allow members to manage heartbeats
            credential:view: Allow members to view credentials
            credential:manage: Allow members to manage credentials
            team:view: Allow members to view teams
            team:create: Allow members to create teams
            team:delete: Allow members to delete teams and team members
            recipe:view: Allow members to view recipes
            recipe:manage: Allow members to manage recipes
            billing:manage: Allow members to manage the organization's subscription
            storage:manage: Allow members to manage the organization's storage providers.
            integrations:manage: Allow members to manage the organization's integrations
            user:view: Allow members to view user details
            resources:view: Allow members to view resources
            resources:create-databases: Allow members to create managed database & cache clusters
            resources:delete-databases: Allow members to delete managed database & cache clusters
            resources:manage-databases: Allow members to manage managed database & cache clusters settings
            resources:create-buckets: Allow members to create object storage buckets
            resources:delete-buckets: Allow members to delete object storage buckets
            resources:manage-buckets: >-
              Allow members to manage object storage buckets and their access
              keys

````