> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/harness-platform/knowledge-base-and-faqs/articles/api-to-clone-pipeline.md).

# API to clone the pipeline

### Clone Pipeline through API <a href="#clone-pipeline-through-api" id="clone-pipeline-through-api"></a>

This knowledge base article walks you through how you can clone the pipeline through API also.

### cURL request to perform <a href="#curl-request-to-perform" id="curl-request-to-perform"></a>

Example cURL:

```
curl -X POST 'https://app.harness.io/gateway/pipeline/api/pipelines/clone?routingId=<ACCOUNT_ID>&accountIdentifier=<ACCOUNT_ID>&storeType=INLINE' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR BEARER TOKEN' \
  -d '{
    "cloneConfig": {
        "connectors": false,
        "inputSets": false,
        "templates": false,
        "triggers": false
    },
    "connectors": false,
    "inputSets": false,
    "templates": false,
    "triggers": false,
    "destinationConfig": {
        "orgIdentifier": "DemoOrg",
        "projectIdentifier": "Test1",
        "pipelineIdentifier": "testpipeline",
        "pipelineName": "testpipeline"
    },"sourceConfig":{
    "orgIdentifier": "DemoOrg",
    "pipelineIdentifier": "testpipeline_Clone",
    "projectIdentifier": "Test2"
}
}'
```
