Update Annotation

Updates an existing annotation's properties such as rating, type, expected output/outcome, explanation, or flagged status. **Validation rules:** - Thread annotations cannot have `expectedOutput` (use `expectedOutcome` instead) - Trace/span annotations cannot have `expectedOutcome` (use `expectedOutput` instead) - The annotation must belong to your project

Path parameters

annotationIdstringRequired
The ID of the annotation to update.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Request

This endpoint expects an object.
ratingdoubleOptional

Updated rating score. Must be 0 or 1 for THUMBS_RATING, 1-5 for FIVE_STAR_RATING.

typeenumOptional
Updated annotation type.
Allowed values:
expectedOutputstringOptional

Updated expected output for trace/span annotations.

expectedOutcomestringOptional
Updated expected outcome for thread annotations.
explanationstringOptional
Updated explanation for the annotation.
flaggedbooleanOptional
Updated flagged status.

Response

Successfully updated annotation
successboolean
This is true if the annotation was successfully updated.
dataobject
This maps to the id of the updated annotation.
deprecatedboolean
This is true if this endpoint is deprecated.

Errors