Unlock a task
Unlocking a task opens a finished document again, so it can be changed and completed once more.
POST https://api.send.ai/v2/{team_id}/project/{project_id}/task/{task_id}/unlock
Scope: Tasks › Edit.
Request
The request has no body.
curl -X POST "https://api.send.ai/v2/tK3vQ9xLm2Rf8WbN0aZp/project/p3irz/task/task_Zp4Rk2Wn8Qx1Lc7Vb3M/unlock" \
-H "Authorization: Bearer $SENDAI_API_KEY"
What unlocking does
A finished document, such as a completed or discarded one, goes back to REVIEWING and waits for a person. What came after it is undone: documents made from it in later steps are removed, and its actions count as not run, so completing it again runs every action again. A filtered document is processed again from the start. A document that is not finished stays as it is.
Unlocking sends the TASK_UNLOCKED notification.
A document of an upload that is already in Processed cannot be unlocked. Re-adding the upload in the app processes it again. See Re-adding an upload.
Response
The answer holds the task, in the same shape as Get a task.
Errors
| Status | Error | Cause |
|---|---|---|
| 400 | Task is already being processed | The document is still processing. |
| 400 | Upload is not completed | The upload is already in Processed. |
| 404 | Task not found | The task does not exist. |