# Clone a Project

Canonical page: https://docs.ovok.com/primitives/clone-project

Create a new Project from an existing Project and selectively copy resources. This is a superadmin operation. Choose included resource types and exclusions deliberately; copied clinical data can contain sensitive information.

| Method | Path |
| --- | --- |
| `POST` | `/fhir/R4/Project/:id/$clone` |

## Request [#request]

```bash
curl --request POST \
  --url "https://api.sandbox.ovok.com/fhir/R4/Project/${PROJECT_ID}/\$clone" \
  --header "Authorization: Bearer ${OVOK_TOKEN}" \
  --header 'Content-Type: application/fhir+json' \
  --data '{"name":"Sandbox copy","resourceTypes":["Patient","Observation"],"includeIds":[],"excludeIds":[]}'
```

| Body field | Type | Description |
| --- | --- | --- |
| `name` | string | Name for the new Project. |
| `resourceTypes` | string array | Resource types to copy. |
| `includeIds` | string array | Optional IDs to include in the clone. |
| `excludeIds` | string array | Optional IDs to omit. |

## Successful response [#successful-response]

The operation creates and returns the new FHIR `Project` resource, typically with `201 Created`.

| Project field | Description |
| --- | --- |
| `resourceType` | `Project`. |
| `id` | Server-assigned ID of the cloned Project. |
| `name` | Name supplied for the new Project. |

Only an authorized superadmin can perform this operation.
