Batch Annotate Queue Items
POSThttps://api.confident-ai.com/v1/annotation-queues/{name}/batch-annotate
Annotates many items in a queue in one request. Each entry in items carries a queueItemId plus the same body as the single-item annotate endpoint.
annotatorEmail and markAsCompleted set at the top level act as defaults applied to any item that omits them; a per-item value takes precedence.
curl -X POST "https://api.confident-ai.com/v1/annotation-queues/{name}/batch-annotate" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"annotatorEmail": "annotator@yourcompany.com",
"markAsCompleted": true,
"items": [
{
"queueItemId": "queue-item-uuid-1",
"rating": 1,
"type": "THUMBS_RATING",
"name": "Correctness",
"explanation": "Matches the expected answer",
"formResponses": [
{
"label": "Clarity",
"value": "Very clear"
},
{
"label": "Overall",
"value": 10
}
]
},
{
"queueItemId": "queue-item-uuid-2",
"rating": 0,
"type": "THUMBS_RATING",
"name": "Correctness"
}
]
}'{
"success": true,
"data": {
"results": [
{
"queueItemId": "queue-item-uuid-1",
"success": true,
"id": "annotation-uuid-1",
"annotationIds": [
"annotation-uuid-1"
],
"formResponseIds": [
"form-response-uuid-1",
"form-response-uuid-2"
]
},
{
"queueItemId": "queue-item-uuid-2",
"success": false,
"error": "No matching criterion for annotation 'Correctness' (THUMBS_RATING). Valid criteria: ..."
}
]
}
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
namestringRequiredThe name of the annotation queue whose items are being annotated.
Request body
annotatorEmailstringDefault annotator for items that omit it. A per-item
annotatorEmailtakes precedence. Required (here or per item) whenever an item submitsformResponses.markAsCompletedbooleanDefault completion flag for items that omit it (effectively
true). A per-item value takes precedence.itemslist of objectsRequiredThe items to annotate. Processed independently (best-effort).
Show 11 propertiesHide 11 properties
queueItemIdstringRequiredThe id of the queue item to annotate.
ratingintegerRating value for a single criterion (0-1 for THUMBS_RATING, 1-5 for FIVE_STAR_RATING). Shorthand for a one-entry
annotationsarray.typeenumType of the rating.
Show 2 enum valuesHide 2 enum values
THUMBS_RATINGFIVE_STAR_RATING
namestringCriterion name. Omit for the default criterion; otherwise it must match a configured custom criterion (or a form criteria field), or the annotation will not appear.
expectedOutcomestringExpected outcome (for thread items only).
expectedOutputstringExpected output (for trace/span items only).
explanationstringExplanation for the rating.
annotationslist of objectsOne entry per criterion. Use instead of the flat fields to rate multiple criteria in a single request.
Show 6 propertiesHide 6 properties
ratingintegerRequiredRating value (0-1 for THUMBS_RATING, 1-5 for FIVE_STAR_RATING).
typeenumType of the rating.
Show 2 enum valuesHide 2 enum values
THUMBS_RATINGFIVE_STAR_RATING
namestringCriterion name. Omit for the default criterion; otherwise it must match a configured custom criterion or a form criteria field.
explanationstringExplanation for the rating.
expectedOutputstringExpected output (for trace/span items only).
expectedOutcomestringExpected outcome (for thread items only).
formResponseslist of objectsAnswers to a form's custom fields, addressed by each field's visible label. Accepted only for queues with an attached form, and requires
annotatorEmail.Show 2 propertiesHide 2 properties
labelstringRequiredThe visible label of the custom field being answered. Must be unique within the form and must not be a criteria field's label.
valuestring | number | boolean | list of stringsThe answer, shaped to the field type. Null clears the answer.
Show 4 variantsHide 4 variants
string
Text or single-select fields.
- OR
number
Number or decimal fields.
- OR
boolean
Yes/No fields (also accepts the strings "Yes"/"No").
- OR
list of strings
Multi-select fields.
annotatorEmailstringProject member to attribute the work to. Required when submitting
formResponses, otherwise they will not appear in the platform.markAsCompletedbooleanWhether to mark the queue item as completed. For form queues, completing enforces the form's required fields.
Response
Batch processed; inspect each result's success flag
successbooleanIndicates the batch request was well-formed and processed. Per-item outcomes are in
data.results.dataobjectShow 1 propertyHide 1 property
resultslist of objectsShow 6 propertiesHide 6 properties
queueItemIdstringsuccessbooleanidstringFirst created annotation's id (success only; null when only form responses were submitted).
annotationIdslist of stringsIdentifiers of the created annotations (success only).
formResponseIdslist of stringsIdentifiers of the created form responses (success only).
errorstringWhy this item failed (failure only).