---
title: "Copy a project"
method: POST
path: "/workspaces/{workspace_id}/projects/{project_id}/copy"
tags: ["Projects"]
---

# Copy a project

`POST /workspaces/{workspace_id}/projects/{project_id}/copy`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/projects/{project_id}/copy`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Copies the project's datasets, with their views and pipelines, into a new project, in one background job. Joins and lookups are pointed at the copies, and exports between copied datasets are recreated. The job's response is `{project_id, dataset_map, view_map, skipped, dashboards}`; `skipped` lists what was left behind or still points outside the copy. Needs permission to create projects in the workspace.

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.
- `project_id` integer, required: Project ID of the workspace

## Request body

- CopyProjectRequest
  - `name` string, required: Name of the new project. A number is appended if it is taken.
  - `dataset_ids` integer[], nullable: Datasets of the source project to copy. Null copies them all.
  - `include_dashboards` boolean: Also copy the dashboards built on the copied datasets
  - `exclude_data` boolean: Copy every dataset's pipeline without its rows

## Response `202`

Request accepted, processing continues off-line

- ObjectJobSchema
  - `status_code` integer, nullable
  - `job_id` integer, nullable: Created job id
  - `failure_reason` string, nullable: Failure reason if status is failure

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/5dfd1c296ded?raw)
