Launch Week 02 wrapped — explore all five launches

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 (use expectedOutcome instead)
  • Trace/span annotations cannot have expectedOutcome (use expectedOutput instead)
  • The annotation must belong to your project
PUT/v1/annotations/{annotationId}
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"
}'
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 to update.

Request body

  • ratingnumber

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

  • typeenum

    Updated annotation type.

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

    Updated expected output for trace/span annotations.

  • expectedOutcomestring

    Updated expected outcome for thread annotations.

  • explanationstring

    Updated explanation for the annotation.

Response

Successfully updated annotation

  • successboolean

    This is true if the annotation was successfully updated.

  • dataobject

    This maps to the id of the updated annotation.

    Show 1 propertyHide 1 property
    • idstring

      This is the id of the updated annotation.

  • deprecatedboolean

    This is true if this endpoint is deprecated.

Built byConfident AI