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

# Update Comment

> Update an existing comment.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json patch /workspaces/{workspace_id}/cases/{case_id}/comments/{comment_id}
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/cases/{case_id}/comments/{comment_id}:
    patch:
      tags:
        - cases
      summary: Update Comment
      description: Update an existing comment.
      operationId: cases-update_comment
      parameters:
        - name: case_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Case Id
        - name: comment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Comment Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaseCommentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseCommentRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    CaseCommentUpdate:
      properties:
        content:
          anyOf:
            - type: string
              maxLength: 25000
              minLength: 1
            - type: 'null'
          title: Content
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
      type: object
      title: CaseCommentUpdate
    CaseCommentRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        content:
          type: string
          title: Content
        parent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Id
        workflow:
          anyOf:
            - $ref: '#/components/schemas/CaseCommentWorkflowRead'
            - type: 'null'
        agent:
          anyOf:
            - $ref: '#/components/schemas/CaseCommentAgentAttributionRead'
            - type: 'null'
        user:
          anyOf:
            - $ref: '#/components/schemas/UserRead'
            - type: 'null'
        last_edited_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Edited At
        deleted_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Deleted At
        is_deleted:
          type: boolean
          title: Is Deleted
          default: false
        mentions:
          items:
            $ref: '#/components/schemas/CaseCommentMentionRead'
          type: array
          title: Mentions
      type: object
      required:
        - id
        - created_at
        - updated_at
        - content
      title: CaseCommentRead
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CaseCommentWorkflowRead:
      properties:
        workflow_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Workflow Id
        title:
          type: string
          title: Title
        alias:
          anyOf:
            - type: string
            - type: 'null'
          title: Alias
        wf_exec_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Wf Exec Id
        status:
          $ref: '#/components/schemas/CaseCommentWorkflowStatus'
      type: object
      required:
        - title
        - status
      title: CaseCommentWorkflowRead
    CaseCommentAgentAttributionRead:
      properties:
        invocation_id:
          type: string
          format: uuid
          title: Invocation Id
        preset_name:
          type: string
          title: Preset Name
        preset_slug:
          type: string
          title: Preset Slug
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
      type: object
      required:
        - invocation_id
        - preset_name
        - preset_slug
      title: CaseCommentAgentAttributionRead
      description: Read model for agent attribution on a generated comment reply.
    UserRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          format: email
          title: Email
        is_active:
          type: boolean
          title: Is Active
          default: true
        is_superuser:
          type: boolean
          title: Is Superuser
          default: false
        is_verified:
          type: boolean
          title: Is Verified
          default: false
        role:
          $ref: '#/components/schemas/UserRole'
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        settings:
          additionalProperties: true
          type: object
          title: Settings
      type: object
      required:
        - id
        - email
        - role
        - settings
      title: UserRead
    CaseCommentMentionRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        target_type:
          $ref: '#/components/schemas/MentionTargetType'
        target_id:
          type: string
          format: uuid
          title: Target Id
        label:
          type: string
          title: Label
        created_at:
          type: string
          format: date-time
          title: Created At
        invocation:
          anyOf:
            - $ref: '#/components/schemas/CaseCommentAgentInvocationRead'
            - type: 'null'
      type: object
      required:
        - id
        - target_type
        - target_id
        - label
        - created_at
      title: CaseCommentMentionRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CaseCommentWorkflowStatus:
      type: string
      enum:
        - running
        - succeeded
        - failed
      title: CaseCommentWorkflowStatus
    UserRole:
      type: string
      enum:
        - basic
        - admin
      title: UserRole
    MentionTargetType:
      type: string
      enum:
        - agent
      title: MentionTargetType
      description: >-
        Polymorphic target kind for a parsed case-comment mention.


        Only ``AGENT`` is supported today. The finite set lives here (rather
        than

        as a bare ``str`` checked at runtime) so every mention-aware call site —

        the parser, persistence, and API read schema — shares one exhaustive,

        type-checked domain of valid target kinds.
    CaseCommentAgentInvocationRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        preset_name:
          type: string
          title: Preset Name
        preset_slug:
          type: string
          title: Preset Slug
        status:
          $ref: '#/components/schemas/CaseCommentAgentInvocationStatus'
        session_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Session Id
        error:
          anyOf:
            - $ref: '#/components/schemas/CaseCommentAgentInvocationError'
            - type: 'null'
      type: object
      required:
        - id
        - preset_name
        - preset_slug
        - status
      title: CaseCommentAgentInvocationRead
      description: Read model for an agent invocation triggered by a comment mention.
    CaseCommentAgentInvocationStatus:
      type: string
      enum:
        - pending
        - running
        - succeeded
        - failed
      title: CaseCommentAgentInvocationStatus
      description: Lifecycle state for an agent invoked from a case-comment mention.
    CaseCommentAgentInvocationError:
      properties:
        kind:
          $ref: '#/components/schemas/CaseCommentAgentInvocationErrorKind'
        message:
          type: string
          title: Message
      type: object
      required:
        - kind
        - message
      title: CaseCommentAgentInvocationError
      description: Structured terminal failure persisted for a comment agent invocation.
    CaseCommentAgentInvocationErrorKind:
      type: string
      enum:
        - startup
        - preparation
        - agent_turn
        - completion
        - cancelled
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````