---
title: "Update Annotation"
method: PUT
path: "/apps/annotations/{annotation_id}"
tags: ["Annotations"]
---

# Update Annotation

`PUT /apps/annotations/{annotation_id}`

**Available for**: Chatflow, Chatbot, Agent apps.

Updates an annotation's question and answer.

## Path parameters

- `annotation_id` string, uuid, required

## Request body

- UpdateAnnotationRequest — Request body for updating an annotation.
  - `question` string, required — New question text for the annotation.
  - `answer` string, required — New answer text for the annotation.

## Response `200`

Annotation updated successfully.

- AnnotationItem
  - `id` string, uuid — Unique annotation identifier.
  - `question` string, nullable — Question text that triggers this annotation.
  - `answer` string, nullable — Predefined answer returned when the annotation is matched.
  - `hit_count` integer, nullable — Number of times this annotation has been matched and returned as a reply.
  - `created_at` integer, nullable — Creation timestamp (Unix epoch seconds).

## Other responses

- `404` — `not_found` : Annotation does not exist.

---

[API](https://skmtc.net/langgenius/apis/dify-service-api.md) · [All operations](https://skmtc.net/langgenius/apis/dify-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langgenius/dify-service-api/revisions/e49b3db72bad/schema)
