Skip to main content

Report a task

Reporting a task records an issue with a document, like Report issue in the app.

POST https://api.send.ai/v2/{team_id}/project/{project_id}/task/{task_id}/report

Scope: Tasks › Edit.

Request​

The body is JSON, with a list of issues and an optional message:

  • issues: Each issue has a label and a value, both text. At least one is needed.
  • message: The message is optional. Without it, the message is "An issue was reported".
curl -X POST "https://api.send.ai/v2/tK3vQ9xLm2Rf8WbN0aZp/project/p3irz/task/task_Zp4Rk2Wn8Qx1Lc7Vb3M/report" \
-H "Authorization: Bearer $SENDAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"issues":[{"label":"Customer","value":"Customer number missing"}],"message":"Please check"}'

What reporting does​

The issue is stored on the document, and the document shows it has an open issue. Its status does not change. Reporting sends the TASK_REPORTED notification, with the issue in it. See Reporting an issue.

Response​

A successful report answers 201 with the task. When the issue was stored but a notification failed, the answer is 207, with "error": "Webhook delivery failed".

Errors​

StatusErrorCause
400Exporting the report message failed. Invalid request bodyThe body has no issues, or an issue is incomplete.