Update Annotation
(v2)PUT
Updates the rating, scale or text of an annotation and returns its id. The target it was left on cannot be changed: expectedOutput is rejected on a thread annotation, and expectedOutcome on a trace or span annotation.
curl -X PUT "https://api.confident-ai.com/v2/annotations/{annotationId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"fieldType": "TEXT",
"value": true,
"explanation": "On reflection the answer omitted the source.",
"expectedOutput": "Mount Everest is 8,848 metres tall.",
"expectedOutcome": "The user learns how tall Mount Everest is.",
"imagesMapping": {}
}'{
"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.
Request body
fieldTypeenumThe kind of value an annotation holds:
TEXT,NUMBER,FLOATorBOOLEANfor a free value,CHOICEorMULTIPLE_CHOICEfor a choice from the options in the field'sconfig, andTHUMBS_RATINGorFIVE_STAR_RATINGfor a rating.Show 8 enum valuesHide 8 enum values
TEXTNUMBERFLOATBOOLEANCHOICEMULTIPLE_CHOICEFIVE_STAR_RATINGTHUMBS_RATING
valuestring | number | boolean | list of stringsThe annotated value, in the shape its
fieldTypeexpects: a boolean forTHUMBS_RATING(trueis thumbs up) andBOOLEAN, a whole number from 1 to 5 forFIVE_STAR_RATING, a number forNUMBERorFLOAT, a string forTEXTandCHOICE, and a list of strings forMULTIPLE_CHOICE.Show 4 variantsHide 4 variants
string
- OR
number
- OR
boolean
- OR
list of strings
explanationstringWhy the annotation was given.
expectedOutputstringThe output the target should have produced. Only for an annotation left on a trace or span.
expectedOutcomestringThe outcome the conversation should have reached. Only for an annotation left on a thread.
imagesMappingobjectImages referenced by
[DEEPEVAL:IMAGE:<key>]markers in the text fields, keyed by that marker's key.
Response
Update Annotation succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to an annotation by its id.
Show 1 propertyHide 1 property
idstringThe id of the annotation, generated by Confident AI.
deprecatedbooleanIndicates if this endpoint is deprecated.