> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# アノテーションを更新

> 既存のアノテーションの質問と回答を更新します。



## OpenAPI

````yaml /ja/api-reference/openapi_chatflow.json put /apps/annotations/{annotation_id}
openapi: 3.0.1
info:
  title: 高度なチャットアプリAPI (Chatflow API)
  description: >-
    Chatflow アプリケーションはセッションの永続化をサポートし、過去のチャット履歴をレスポンスのコンテキストとして使用できます。Chatflow
    アプリは `advanced-chat`
    モードを使用し、ノードの開始・完了、イテレーション、ワークフローのライフサイクルを含む詳細な実行追跡のためのワークフローレベルのストリーミングイベントを提供します。
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: Chatflow アプリ API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。
    variables:
      api_base_url:
        default: api.dify.ai/v1
        description: API ベース URL のホストとパス（`https://` を除く）。
security:
  - ApiKeyAuth: []
tags:
  - name: チャットフロー
    description: チャットフローアプリケーションの操作です（チャットメッセージ、ワークフロー実行詳細、イベントストリーミングを含む）。
  - name: ファイル操作
    description: ファイルのアップロードとプレビューの操作です。
  - name: エンドユーザー
    description: エンドユーザー情報に関連する操作です。
  - name: メッセージフィードバック
    description: ユーザーフィードバックの操作です。
  - name: 会話管理
    description: 会話管理に関連する操作です。
  - name: 音声・テキスト変換
    description: テキスト読み上げと音声認識の操作です。
  - name: アプリケーション設定
    description: アプリケーション設定と情報を取得する操作です。
  - name: アノテーション管理
    description: ダイレクト返信用のアノテーション管理に関連する操作です。
  - name: 人間の入力
    description: 人間の入力を要する一時停止中のワークフローの再開操作です。
paths:
  /apps/annotations/{annotation_id}:
    put:
      tags:
        - アノテーション管理
      summary: アノテーションを更新
      description: 既存のアノテーションの質問と回答を更新します。
      operationId: updateChatflowAnnotationJa
      parameters:
        - name: annotation_id
          in: path
          required: true
          description: 更新するアノテーションの一意の識別子です。
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAnnotationRequest'
            examples:
              updateAnnotation:
                summary: リクエスト例
                value:
                  question: What is Dify?
                  answer: >-
                    Dify is an open-source LLM application development platform
                    for building AI-powered apps.
      responses:
        '200':
          description: アノテーションが正常に更新されました。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationItem'
              examples:
                updatedAnnotation:
                  summary: レスポンス例
                  value:
                    id: a1b2c3d4-5678-90ab-cdef-1234567890ab
                    question: What is Dify?
                    answer: >-
                      Dify is an open-source LLM application development
                      platform for building AI-powered apps.
                    hit_count: 5
                    created_at: 1705407629
        '403':
          description: '`forbidden` : アノテーションを編集する権限がありません。'
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    status: 403
                    code: forbidden
                    message: Forbidden.
        '404':
          description: '`not_found` : アノテーションが存在しません。'
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    status: 404
                    code: not_found
                    message: Annotation not found.
components:
  schemas:
    UpdateAnnotationRequest:
      type: object
      description: アノテーション更新のリクエストボディです。
      required:
        - question
        - answer
      properties:
        question:
          type: string
          description: 更新されたアノテーションの質問です。
        answer:
          type: string
          description: 更新されたアノテーションの回答です。
    AnnotationItem:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: アノテーションの一意識別子です。
        question:
          type: string
          nullable: true
          description: このアノテーションをトリガーする質問テキストです。
        answer:
          type: string
          nullable: true
          description: アノテーションがマッチした際に返される定義済みの回答です。
        hit_count:
          type: integer
          nullable: true
          description: このアノテーションがマッチして返信として返された回数です。
        created_at:
          type: integer
          format: int64
          nullable: true
          description: 作成タイムスタンプ（Unix エポック秒）。
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer `
        プレフィックスを付けた API Key を含めてください。例：`Authorization: Bearer {API_KEY}`。**API
        Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key
        の漏洩は深刻な結果につながる可能性があります。**

````