---
title: "Duplicates a site from another given site."
method: POST
path: "/sites/{siteId}/actions/duplicate"
tags: ["Sites"]
---

# Duplicates a site from another given site.

`POST /sites/{siteId}/actions/duplicate`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/sites/{siteId}/actions/duplicate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/sites/:siteId/actions/duplicate/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `siteId` string, required

## Request body

- object
  - `environment_mapping` string[], required: Array of environment mappings. You must provide exactly one environment mapping. Each entry maps a source environment ID to a target environment ID, separated by a colon.
  - `site_name` string, required: Machine name for the duplicated site. Must start with a lowercase letter and contain only lowercase letters and numbers. Maximum 14 characters.
  - `site_label` string, required: Human-readable label for the duplicated site. Must only contain letters, numbers, and spaces. Maximum 50 characters.
  - `site_id` string, uuid: An optional explicit UUID for the new duplicated site. A UUID is generated automatically if omitted.
  - `hook_argument` string: Optional hook argument to pass to the duplication process.

## Response `202`

Site duplication started

- object
  - `_links` object, required: HAL links for the resource
    - `self` SiteServiceAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object: Embedded resources (optional)
  - `message` 'Site duplication started.', required: Confirmation message

## Other responses

- `400`: Validation Error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
