# Duplicating a project using API

**URL:** <https://forum.asana.com/t/duplicating-a-project-using-api/82345>\
**Category:** API & Developers\
**Created:** [4 May 2020 10:04 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345 "2020-05-04T10:04:06Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon45644609](https://luna1.co/8d76cd.png) [@anon45644609](https://forum.asana.com/u/anon45644609)\
**Post date:** [4 May 2020 10:04 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/1 "2020-05-04T10:04:07Z")

</div>

Hi,

```
I am using API to duplicate a project using python code. Data passed to the API is as below.

data = {"include": [
  "members",
  "notes",
  "task_notes",
  "task_assignee",
  "task_subtasks",
  "task_attachments",
  "task_dependencies",
  "task_followers",
  "task_tags",
  "task_projects"
],
  "name":name,
   "schedule_dates": {
    "due_on": due_on,
    "should_skip_weekends": false,
    "start_on": start_on
},
  "team":team
    }

```

Below error is displayed.

message

schedule\_dates: Value is not an object

Can you please confirm if the above format is correct for setting the values for schedule\_dates?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [4 May 2020 10:24 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/2 "2020-05-04T10:24:43Z")

</div>

Hi @anon45644609,

I can see two issues in terms of this portion of [the documentation](https://developers.asana.com/docs/duplicate-a-project) that discusses project duplication and `schedule_dates`:

> `task_dates` must be included to use this option. Requires either `start_on` or `due_on` , but not both.

First, you haven’t included `task_dates`. Second, you’ve included both `start_on` and `due_on` which isn’t allowed.

Try correcting those two things and see if that helps.

---

<div class="post-metadata">

**Author:** ![anon45644609](https://luna1.co/8d76cd.png) [@anon45644609](https://forum.asana.com/u/anon45644609)\
**Post date:** [4 May 2020 12:22 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/3 "2020-05-04T12:22:41Z")

</div>

Updated the code as below. Still facing the same issue.

data = {“include”: [  
“members”,  
“notes”,  
“task\_notes”,  
“task\_assignee”,  
“task\_subtasks”,  
“task\_attachments”,  
“task\_dates”,  
“task\_dependencies”,  
“task\_followers”,  
“task\_tags”,  
“task\_projects”  
],  
“name”:name,  
“schedule\_dates”: {  
“due\_on”: due\_on,  
“should\_skip\_weekends”: false  
},  
“team”:team  
}

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [4 May 2020 13:16 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/4 "2020-05-04T13:16:13Z")

</div>

Hmm. I’ve never used the `schedule_dates` feature of that API endpoint so I’m afraid I can’t be of any help from personal experience.

@Ross_Grambo any ideas here?

---

<div class="post-metadata">

**Author:** ![Ross\_Grambo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ross_grambo/32/68568_2.png) [@Ross\_Grambo](https://forum.asana.com/u/Ross_Grambo)\
**Post date:** [4 May 2020 20:06 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/5 "2020-05-04T20:06:31Z")

</div>

Hey @anon45644609,

I tried postman with the below data and it works as expected.

```auto
{"data": {
	"include": [
	"members",
	"notes",
	"task_notes",
	"task_assignee",
	"task_subtasks",
	"task_attachments",
	"task_dates",
	"task_dependencies",
	"task_followers",
	"task_tags",
	"task_projects"
	],
	"name": "Example",
	"schedule_dates": {
		"due_on": "2019-05-21",
		"should_skip_weekends": false
	},
	"team": "1234567890"
	}
} 

```

So I tried python2.7 and python3 with:

```auto
job = client.projects.duplicate_project("1234567890", {
        "include": [
            "members",
            "notes",
            "task_notes",
            "task_assignee",
            "task_subtasks",
            "task_attachments",
            "task_dates",
            "task_dependencies",
            "task_followers",
            "task_tags",
            "task_projects"
        ],
        "name": "Example",
        "schedule_dates": {
            "due_on": "2019-05-21",
            "should_skip_weekends": False
        },
        "team": "1234567890"
    }
)

```

And both of those worked as expected. You should confirm that your variables are turning into strings appropriately.

Hope this helps,  
Ross

---

<div class="post-metadata">

**Author:** ![anon45644609](https://luna1.co/8d76cd.png) [@anon45644609](https://forum.asana.com/u/anon45644609)\
**Post date:** [5 May 2020 07:25 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/6 "2020-05-05T07:25:27Z")

</div>

Hi Ross,

Variables are turning into correct string values. I see the issue exists only for the data that is inside the paranthesis { }.

“schedule\_dates”: {  
“due\_on”: “2019-05-21”,  
“should\_skip\_weekends”: False  
}

If I remove schedule\_dates parameter then the project gets created. I am using ZAP application and using python code inside ZAP.

---

<div class="post-metadata">

**Author:** ![Ross\_Grambo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ross_grambo/32/68568_2.png) [@Ross\_Grambo](https://forum.asana.com/u/Ross_Grambo)\
**Post date:** [6 May 2020 18:28 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/7 "2020-05-06T18:28:15Z")

</div>

@anon45644609,

Is ZAP short for Zapier? If so, you’ll need to reach out to them to debug this, as it’s not an issue in our code.

---

<div class="post-metadata">

**Author:** ![anon45644609](https://luna1.co/8d76cd.png) [@anon45644609](https://forum.asana.com/u/anon45644609)\
**Post date:** [7 May 2020 08:54 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/8 "2020-05-07T08:54:52Z")

</div>

Yes, Ross. It is Zapier.

I have already logged a ticket with Zapier and they had asked for log from POSTMAN for successful call.

---

<div class="post-metadata">

**Author:** ![Ross\_Grambo](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ross_grambo/32/68568_2.png) [@Ross\_Grambo](https://forum.asana.com/u/Ross_Grambo)\
**Post date:** [7 May 2020 20:07 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/9 "2020-05-07T20:07:16Z")

</div>

I’d recommend using the body I gave earlier ^ and doing the postman call so you can share the logs with them. You’ll be hitting the `https://app.asana.com/api/1.0/projects/{project_gid}/duplicate` endpoint, and you’ll need to set an Authorization header to “Bearer {your\_PAT}”.

---

<div class="post-metadata">

**Author:** ![anon45644609](https://luna1.co/8d76cd.png) [@anon45644609](https://forum.asana.com/u/anon45644609)\
**Post date:** [8 May 2020 05:00 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/10 "2020-05-08T05:00:02Z")

</div>

Yes, Ross. I have already shared the POSTMAN log with them.

---

<div class="post-metadata">

**Author:** ![Dogancan\_Ulug](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/dogancan_ulug/32/91808_2.png) [@Dogancan\_Ulug](https://forum.asana.com/u/Dogancan_Ulug)\
**Post date:** [31 December 2021 17:06 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/11 "2021-12-31T17:06:50Z")

</div>

Hi,

I have a template with tags. When duplicating that template I would like to keep tasks that are specific tag.

For example, I have a template with Task A,B,C with following tags;

Task-A has “Red, Orange, Pink” as a tag  
Task-B has “Red, Blue” as a tag  
Task-C has “Blue, Yellow” as a tag

My goal is to duplicate my template regarding “Red” tag and only keep “Task-A” and "Task-B"on my new project.

Is it possible with this code?  
Code=\> **“task\_tags”:“Red”**

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [31 December 2021 18:44 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/12 "2021-12-31T18:44:18Z")

</div>

Hi @Dogancan_Ulug!

First, just to clarify, you’ve posted in the Developers & API section which is for developers writing code to interact with Asana, but are you asking about using the `POST /projects/{project_gid}/duplicate` API endpoint, or your question is not related to coding but rather the product “Duplicate” option in the Asana UI?

Although, in the end the answer is the same, which is no, there’s no capability in either duplication functionality to only duplicate a certain subset of tasks.

You would have to write code to manually do the duplication using the API.

---

<div class="post-metadata">

**Author:** ![Dogancan\_Ulug](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/dogancan_ulug/32/91808_2.png) [@Dogancan\_Ulug](https://forum.asana.com/u/Dogancan_Ulug)\
**Post date:** [4 January 2022 14:49 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/13 "2022-01-04T14:49:36Z")

</div>

Hi @Phil_Seeman,

My question was duplicating a project by using Asana POST API, not UI.

I am using Microsoft Power Automate for duplicating different templates(32 different templates) with POST API every time. However, I want to have one master template and duplicate template and filter among their custom fields by POST API.

So, I am trying to push parameters to API and filter necessary tasks when I want to duplicate from the master template. As I told you, I am using Power Automate for coding.

PS: Currently I have 32 templates with 50 tasks. For future, I will have 400 tasks as a master template and trying to filter 50 tasks by custom fields.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:04 UTC](https://forum.asana.com/t/duplicating-a-project-using-api/82345/14 "2025-05-30T19:04:48Z")

</div>

Closed on 30 May 2025 19:04 UTC


