Subtask under a Subtask-Section

I am working with the API. I have a task with a subtask-section (subtask ending in a colon). I would like to create subtask under this subtask-section through the API. Essentially grouping my subtask.

I have tried membership, section, and parent options. I am unable to figure this out. Any Suggestions?

Whoa, what an interesting edge case you found here… I don’t know that there is any simple way to do this. You could do a pretty hacky workaround that relies on our insertion order; that is, when you set the parent on a task with setParent it always goes at the top of the list of subtasks. You could get the subtasks on the task, call setParent with "parent"=null on them to unset them, then call setParent again in reverse-sorted order in order to rebuilt the subtasks from “the bottom up”. That’s annoying, but it’d probably work.

The June 26, 2018 API Update announced the ability to sort subtask.