Ordering sub task when created through API



Hi All,

I am using Asana API with java. I am facing problem with subtasks when created with API. When I create any subtask, it always creates above the previous one. Can any one guide me how to move one subtask at bottom of previous subtask?


Hey @Kuldeep_Poonia,

unfortunately there is no easy way to order the subtasks. You can use this hacky workaround:


For myself, I just reverse the order of sub-tasks and add them like this. So, they will be in correct order when you add them as LIFO.
I believe there’s one more possibility: there’s insert_after and insert_before options when using addProject API endpoint.

Here what docs say: addProject can also be used to reorder a task within a project or section that already contains it.
I didn’t try this functionality yet but I believe it should work in your case (still, reverse order add should be faster: 1 request instead of 2).


Thanks Diakoptis. I have solved it by creating section in reverse order.


Thanks Dmytro_TOLSTYI, I have created my section with reversed order.