Tasks
Add Subtask
Add a subtask to an existing task.
POST
/
tasks
/
{id}
/
subtasks
curl -X POST http://localhost:3000/api/v1/tasks/clxyz789/subtasks \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "Write unit tests"}'
{
"id": "clsub001",
"title": "Write unit tests",
"completed": false,
"taskId": "clxyz789"
}
Path Parameters
string
required
Parent task ID.
Body
string
required
Subtask title.
curl -X POST http://localhost:3000/api/v1/tasks/clxyz789/subtasks \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "Write unit tests"}'
{
"id": "clsub001",
"title": "Write unit tests",
"completed": false,
"taskId": "clxyz789"
}
⌘I
curl -X POST http://localhost:3000/api/v1/tasks/clxyz789/subtasks \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"title": "Write unit tests"}'
{
"id": "clsub001",
"title": "Write unit tests",
"completed": false,
"taskId": "clxyz789"
}