Get the tree of a task
Getting the tree of a task returns its whole upload: every document in every step, and how they came from each other.
GET https://api.send.ai/v2/{team_id}/project/{project_id}/task/{task_id}/tree
Scope: Tasks › Read.
Why a tree
One file can become several documents on its way through the processing pipeline. Split and Segmentation make documents out of a file, and the Router sends each document on to a task. The tree shows these steps, starting at the upload. Any task of the upload gives the same tree.
Response
Each item has children. The root is the upload; below it come the tasks, one level for each step.
{
"payload": {
"item": {
"id": "upld_7Hq2LmX9aB3cD4eF5gH",
"type": "upload",
"name": "Order 4471",
"status": "COMPLETED",
"created_at": "2026-11-02T09:12:00.000Z"
},
"children": [
{
"item": {
"id": "task_Hc2Lq0vXyT4mN7sKd1e",
"type": "task",
"step_type": "CLASSIFY",
"name": "order-4471.pdf",
"status": "COMPLETED",
"created_at": "2026-11-02T09:12:05.000Z"
},
"children": [
{
"item": {
"id": "task_Zp4Rk2Wn8Qx1Lc7Vb3M",
"type": "task",
"step_type": "EXTRACT",
"name": "order-4471.pdf",
"status": "COMPLETED",
"created_at": "2026-11-02T09:12:44.000Z"
},
"children": []
}
]
}
]
}
}
Use Get a task for the details of one of them.
Errors
| Status | Error | Cause |
|---|---|---|
| 400 | Task not found | The task does not exist. |