Update Annotation
PUThttps://api.confident-ai.com/v1/annotations/{annotationId}
Updates an existing annotation's properties such as rating, type, expected output/outcome, or explanation.
Validation rules:
- Thread annotations cannot have
expectedOutput(useexpectedOutcomeinstead) - Trace/span annotations cannot have
expectedOutcome(useexpectedOutputinstead) - The annotation must belong to your project
curl -X PUT "https://api.confident-ai.com/v1/annotations/{annotationId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"rating": 5,
"type": "FIVE_STAR_RATING",
"expectedOutput": "Provide detailed password reset steps with security considerations",
"explanation": "Updated: Response now includes security best practices"
}'{
"success": true,
"data": {
"id": "ANNOTATION-ID"
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
annotationIdstringRequiredThe ID of the annotation to update.
Request body
ratingnumberUpdated rating score. Must be 0 or 1 for THUMBS_RATING, 1-5 for FIVE_STAR_RATING.
typeenumUpdated annotation type.
Show 2 enum valuesHide 2 enum values
THUMBS_RATINGFIVE_STAR_RATING
expectedOutputstringUpdated expected output for trace/span annotations.
expectedOutcomestringUpdated expected outcome for thread annotations.
explanationstringUpdated explanation for the annotation.
Response
Successfully updated annotation
successbooleanThis is true if the annotation was successfully updated.
dataobjectThis maps to the id of the updated annotation.
Show 1 propertyHide 1 property
idstringThis is the id of the updated annotation.
deprecatedbooleanThis is true if this endpoint is deprecated.