Approve a task
Approving a task marks a document for training, like Mark for training in the app.
POST https://api.send.ai/v2/{team_id}/project/{project_id}/task/{task_id}/approve
Scope: Tasks › Edit.
Request
The request has no body.
curl -X POST "https://api.send.ai/v2/tK3vQ9xLm2Rf8WbN0aZp/project/p3irz/task/task_Zp4Rk2Wn8Qx1Lc7Vb3M/approve" \
-H "Authorization: Bearer $SENDAI_API_KEY"
What approving does
The document, with its annotations, is added as a sample to the model of its step in AI Studio, so the model learns from it. The task gets "approved": true. When the step has no model from AI Studio, only the mark is set. See Samples.
A later change to the labels of the document in the app removes the mark again. To remove it yourself, see Disapprove a task.
Response
The answer holds the task, in the same shape as Get a task.
Errors
| Status | Error | Cause |
|---|---|---|
| 400 | Task cannot be approved while it is being processed | The document is still processing. |
| 400 | Task is already approved | The document is already marked. |
| 404 | Task not found | The task does not exist. |