# Duplicate an existing project

> [!WARNING] Warning: Experimental API
> Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

## Query parameters

**`confirm_mux_encoding_consumption`**

- Type: string
- Example: `"true"`

Confirm the operation, even if the copy of videos contained in the project requires significant use of Video Encoding resources

## Body parameters

**`name`**

- Required
- Type: string
- Example: `"My blog"`

Site name

**`ignore_content`**

- Optional
- Type: boolean

When duplicating a site it allows to duplicate only the schema

**`payment_intent_id`**

- Optional
- Type: string

**`recurrence`**

- Optional
- Type: enum
- Example: `"monthly"`

Type of recurrence (yearly/monthly)

<details>
<summary>Show enum values</summary>

**`yearly`**

- Optional

**`monthly`**

- Optional

</details>

**`extra_packets`**

- Optional
- Type: object

Extra packets

Example:

```json
{
  users: 1,
  locales: 1,
  item_types: 0,
  roles: 0,
  build_triggers: 0,
  access_tokens: 0,
  mux_encoding_seconds: 0,
  sandbox_environments: 0,
  items: 0,
  uploadable_bytes: 0,
}
```

<details>
<summary>Show object format</summary>

**`users`**

- Optional
- Type: integer

**`locales`**

- Optional
- Type: integer

**`item_types`**

- Optional
- Type: integer

**`roles`**

- Optional
- Type: integer

**`build_triggers`**

- Optional
- Type: integer

**`search_indexes`**

- Optional
- Type: integer

**`access_tokens`**

- Optional
- Type: integer

**`mux_encoding_seconds`**

- Optional
- Type: integer

**`sandbox_environments`**

- Optional
- Type: integer

**`items`**

- Optional
- Type: integer

**`uploadable_bytes`**

- Optional
- Type: integer

</details>

**`billing_profile`**

- Optional
- Type: null, object

<details>
<summary>Show object format</summary>

**`address_line`**

- Required
- Type: string

**`city`**

- Required
- Type: string

**`country`**

- Required
- Type: string

**`email`**

- Required
- Type: string

**`first_name`**

- Required
- Type: string

**`last_name`**

- Required
- Type: string

**`state`**

- Required
- Type: string

**`zip`**

- Required
- Type: string

**`company`**

- Optional
- Type: null, string

**`vat_number`**

- Optional
- Type: null, string

**`cf_cod_fiscale`**

- Optional
- Type: null, string

**`cf_cod_fiscale_partecipante_gruppo_iva`**

- Optional
- Type: null, string

</details>

**`plan`**

- Optional
- Type: [ResourceLinkage\<"site_plan"\>](http://localhost:8080/docs/content-management-api/resources/site_plan.md)

Subscription plan

**`billing_profile`**

- Optional
- Type: [ResourceLinkage\<"per_site_pricing_billing_profile"\>](http://localhost:8080/docs/content-management-api/resources/per_site_pricing_billing_profile.md), null

Billing profile

## Returns

Returns a resource object of type [site](https://www.datocms.com/docs/content-management-api/resources/site.md)

## Examples

###### Example Basic example

Code

```javascript
import { buildClient } from "@datocms/dashboard-client";

async function run() {
  const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });

  const siteId = "155";

  const site = await client.sites.rawDuplicate(siteId, {
    type: "site_duplication",
    attributes: { name: "My blog" },
  });

  // Check the 'Returned output' tab for the result ☝️
  console.log(site);
}

run();
```

Returned output

```javascript
{
  type: "site",
  id: "155",
  attributes: {
    name: "My blog",
    domain: "admin.foobar.com",
    internal_domain: "clueless-star-1231.admin.datocms.com",
    last_data_change_at: "2020-04-21T07:57:11.124Z",
    access_token: "",
    created_at: "2020-04-21T07:57:11.124Z",
    deactivated: true,
  },
  meta: {
    last_data_change_at: "2017-03-30T09:29:14.872Z",
    created_at: "2017-03-30T09:29:14.872Z",
    deactivated: true,
    status: "",
    owner: { type: "account", email: "mark@foobar.com" },
    require_2fa: false,
  },
  relationships: {
    active_subscription: { data: null },
    active_plan: { data: null },
    transfer: { data: { type: "site_transfer", id: "124" } },
  },
}
```

## Related content in "Dashboard API"

- [Account](https://www.datocms.com/docs/dashboard-api/resources/account.md)
- [Session](https://www.datocms.com/docs/dashboard-api/resources/session.md)
- [OAuth application](https://www.datocms.com/docs/dashboard-api/resources/oauth-application.md)
- [Organization](https://www.datocms.com/docs/dashboard-api/resources/organization.md)
- [Organization role](https://www.datocms.com/docs/dashboard-api/resources/organization-role.md)
- [Organization invitation](https://www.datocms.com/docs/dashboard-api/resources/organization-invitation.md)
- [Organization membership](https://www.datocms.com/docs/dashboard-api/resources/organization-membership.md)
- [Organization mandate request](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate-request.md)
- [Organization mandate](https://www.datocms.com/docs/dashboard-api/resources/organization-mandate.md)
- [Project](https://www.datocms.com/docs/dashboard-api/resources/site.md)
- [Retrieve a project](https://www.datocms.com/docs/dashboard-api/resources/site/self.md)
- [List all projects](https://www.datocms.com/docs/dashboard-api/resources/site/instances.md)
- [Create a new project](https://www.datocms.com/docs/dashboard-api/resources/site/create.md)
- [Update project](https://www.datocms.com/docs/dashboard-api/resources/site/update.md)
- [Delete a project](https://www.datocms.com/docs/dashboard-api/resources/site/destroy.md)
- [Duplicate an existing project](https://www.datocms.com/docs/dashboard-api/resources/site/duplicate.md)
- [Site invitation](https://www.datocms.com/docs/dashboard-api/resources/site-invitation.md)
- [Site transfer request](https://www.datocms.com/docs/dashboard-api/resources/site-transfer.md)
- [Account subscription](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-owner-pricing-billing-profile.md)
- [Invoice](https://www.datocms.com/docs/dashboard-api/resources/invoice.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/resource-usage.md)
- [Daily Usage](https://www.datocms.com/docs/dashboard-api/resources/daily-usage.md)
- [Subscription limit](https://www.datocms.com/docs/dashboard-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/dashboard-api/resources/subscription-feature.md)
- [Job result](https://www.datocms.com/docs/dashboard-api/resources/job-result.md)
- [Per-project subscription](https://www.datocms.com/docs/dashboard-api/resources/site-subscription.md)
- [Plan](https://www.datocms.com/docs/dashboard-api/resources/site-plan.md)
- [Billing profile](https://www.datocms.com/docs/dashboard-api/resources/per-site-pricing-billing-profile.md)