Skip to main content

Get Task

Retrieve details for a specific task.

Endpoint

GET /v2/{team_id}/project/{project_id}/task/{task_id}

Authentication

This endpoint requires an API key with the task.read scope.

Request Parameters

ParameterTypeRequiredDescription
team_idStringYesThe ID of the team
project_idStringYesThe ID of the project
task_idStringYesThe ID of the task to get

Example Request

curl -X GET \
'https://api.send.ai/v2/team_123456/project/proj_123456/task/task_abcdef123456' \
-H 'Authorization: Bearer YOUR_API_KEY'

Response

The response includes the full public task object.

{
"payload": {
"id": "task_abcdef123456",
"name": "Document Analysis Task",
"created_at": "2024-01-15T10:30:00Z",
"meta": [
{
"name": "category",
"value": "invoice"
}
],
"status": "REVIEWING",
"step_type": "EXTRACT",
"upload_id": "upl_123456789",
"project_id": "proj_123456",
"approved": false,
"exported_at": null,
"export_failed_at": null,
"last_opened_at": "2024-01-15T11:45:00Z",
"pages": [
{
"id": "page_1",
"width": 2480,
"height": 3508,
"annotations": [
{
"id": "ann_1",
"entity_id": "total_amount",
"confidence": 0.98,
"content": "$1,234.56",
"top": 120.5,
"left_of_line": 340.0
}
],
"checkboxes": [
{
"id": "cb_1",
"confidence": 0.92,
"checked": true,
"coordinates": [
[100, 100],
[120, 100],
[120, 120],
[100, 120]
]
}
],
"segments": [
{
"id": "seg_1",
"confidence": 0.87,
"coordinates": [
[50, 50],
[400, 50],
[400, 200],
[50, 200]
]
}
],
"signatures": [
{
"id": "sig_1",
"confidence": 0.83,
"coordinates": [
[800, 600],
[1100, 600],
[1100, 750],
[800, 750]
]
}
]
}
]
}
}

Response Fields

Top-level fields:

FieldTypeDescription
idStringUnique task identifier
nameStringTask name
created_atString (ISO 8601)Task creation timestamp
metaArrayMetadata key-value pairs
statusStringTask processing status
step_typeStringType of processing step
upload_idStringAssociated upload ID
project_idStringAssociated project ID
approvedBooleanWhether task has been approved
exported_atString/nullExport timestamp (if exported)
export_failed_atString/nullExport failure timestamp (if failed)
last_opened_atString/nullLast time task was opened
pagesArray<Page>Per-page data and extracted items

Page object

FieldTypeDescription
idStringPage identifier
widthNumber/nullPage width in pixels (if known)
heightNumber/nullPage height in pixels (if known)
annotationsArray<Annotation>Extracted field-level annotations
checkboxesArray<Checkbox>Detected checkboxes
segmentsArray<Segment>Detected page segments
signaturesArray<Signature>Detected signatures

Annotation

FieldTypeDescription
idStringAnnotation identifier
entity_idStringAssociated entity/field identifier
confidenceNumberConfidence score
contentStringExtracted text content
topNumber/nullVertical offset from top of page (if available)
left_of_lineNumber/nullHorizontal offset relative to text line (if any)

Checkbox

FieldTypeDescription
idStringCheckbox identifier
confidenceNumberDetection confidence
checkedBooleanWhether the checkbox is checked
coordinatesCoordinatesBounding polygon: [[x1,y1],[x2,y2],[x3,y3],[x4,y4]]

Segment

FieldTypeDescription
idStringSegment identifier
confidenceNumberDetection confidence
coordinatesCoordinatesBounding polygon: [[x1,y1],[x2,y2],[x3,y3],[x4,y4]]

Signature

FieldTypeDescription
idStringSignature identifier
confidenceNumberDetection confidence
coordinatesCoordinatesBounding polygon: [[x1,y1],[x2,y2],[x3,y3],[x4,y4]]

Coordinates are returned as an array of four points defining a rectangle, in clockwise order starting from the top-left.

Status Values

  • PROCESSING - Task is being processed
  • REVIEWING - Task is ready for review
  • COMPLETED - Task has been completed
  • FAILED - Task processing failed
  • DISCARDED - Task has been discarded
  • FILTERED - Task was filtered out

Step Types

  • EXTRACT - Data extraction step
  • CLASSIFY - Classification step
  • SEGMENT - Segmentation step
  • GROUP - Grouping step