Launch Week 02 wrapped — explore all five launches

Update Annotation

PUThttps://api.confident-ai.com/v2/annotations/{annotationId}

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.

PUT/v2/annotations/{annotationId}
curl -X PUT "https://api.confident-ai.com/v2/annotations/{annotationId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "rating": 0,
  "type": "FIVE_STAR_RATING",
  "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": {}
}'
200
{
  "success": true,
  "data": {
    "id": "<ANNOTATION-ID>"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • annotationIdstringRequired

    The id of the annotation.

Request body

  • ratinginteger

    The rating to record: 0 or 1 for a THUMBS_RATING, 1 to 5 for a FIVE_STAR_RATING.

  • typeenum

    This is the type of annotation, which can be either thumbs rating or five star rating.

    Show 2 enum valuesHide 2 enum values
    • FIVE_STAR_RATING
    • THUMBS_RATING
  • explanationstring

    Why the rating was given.

  • expectedOutputstring

    The output the target should have produced. Only for an annotation left on a trace or span.

  • expectedOutcomestring

    The outcome the conversation should have reached. Only for an annotation left on a thread.

  • imagesMappingobject

    Images referenced by [DEEPEVAL:IMAGE:<key>] markers in the text fields, keyed by that marker's key.

Response

Update Annotation succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to an annotation by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the annotation, generated by Confident AI.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI