Create and reparent subtasks via the API

AI-assisted draft for discussion — not a spec to merge.

The issue I am attempting to resolve:
Subtasks work great in the web app and are readable via ?expand=subtasks, but the API can’t create or reparent them: the Task payload has no writable parent_id, and there’s no subtask endpoint.

I’m building automations (with IFTTT and AI agents) that author hierarchical tasks — breakdowns, capture into lists, tickets-with-steps. Some of this is for easy access for special needs persons.

Read-only isn’t enough; I need to set a task’s parent at creation and move it later.

Proposed: a writable parent_id on create/update, mirroring how bucket_id already works as a move field:

POST /api/v1/projects/{id}/tasks
{ “title”: “Design phase”, “parent_id”: 42 }

POST /api/v1/tasks/7
{ “parent_id”: 99 }

MVP: reject parent cycles, enforce write access on the target parent, and default ordering among siblings. Everything else (whole-subtree reparent, cross-project) is a follow-up — not needed for the core use case.

Questions:
Is this on the roadmap, or should the subtask relationship stay UI-only?

Parent/Subtask are relations which you can set via the API: Vikunja API

Everything you can do in Vikunja via the UI is using the same API that you have available for automations as well.