Duplicating Template Section or Tasks to a New Project

I am trying to use the API to duplicate a Task or a entire section of tasks over to a newly created projected.

This is for an onboarding a client use case that depending on the clients sign up choices, a section or certain tasks be duplicated over to their new project.

I noticed the duplicate a task endpoint ,but unclear if this is the first step, then assign the project to the task.

Any possible code would be greatly appreciate to test in postman.

Thanks

Exactly correct - duplicate the task first, then assign the project to the new task.

can you duplicate multiple tasks in one request?

No, I don’t believe so. You might be able to use the Batch API - that may be the closest you can get.

Thats a good idea. thanks. Wondering too if you could have a series of task copies, then apply all of them to the same project?
Do you know if you can copy over milestones?

You’d have to do each one individually (but again you could do that in a Batch).

Yes - from an API standpoint milestones are just tasks with the resource_subtype property set to milestone.