# Duplicate a site

You can create a site by duplicating an existing one. When you duplicate a site, its content items (such as pages and images, folder structure, and links) are copied. Most of the settings are also copied, but you can change those later. The new site's path parameters and response body schema will be the same as the original site.

Endpoint: POST /api/v1/sites/{siteId}/copy
Version: v1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http Bearer

## Path parameters:

  - `siteId` (string, required)
    The identifier of the site you want to duplicate.

## Query parameters:

  - `environmentId` (string)
    The identifier of the environment

## Request body:

  - `application/json, text/json, application/*+json` (unknown)
    Input object containing the name and description of the new site

## Request fields (application/json):

  - `name` (string, required)
    Name for the new site.
Example value: skate-park
    Example: skate-park

  - `displayName` (string)
    Display name for the new site.
Example value: Skate Park
    Example: Skate Park

  - `description` (string)
    Description for the new site.
Example value: Sample showcase website description.
    Example: Sample showcase website description.

  - `posMappings` (array)
    Analytics identifiers for the new site.

  - `posMappings.name` (string, required)
    The name of the analytics identifier.
Example value: skate-park
    Example: skate-park

  - `posMappings.language` (string, required)
    The language for the analytics identifier.
Example value: en
    Example: en

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `handle` (string)

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 404:

  - `404` (unknown)
    Not found

## Response 404 fields (application/json):

  - `type` (string)
    The type of the error response entity.

  - `title` (string)
    The title of the error response entity.

  - `status` (integer)
    The response status code.

  - `detail` (string)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string)
    If available, a URI reference that identifies the specific occurrence of the problem.

