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

# Update an entity comment

> Only the comment's author can change it.



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json patch /workspaces/entity/{entity_type}/{entity_id}/comment/{id}
openapi: 3.1.0
info:
  title: Workspaces API
  version: 1.1.0
  description: >-
    Spaces, tasks, task actions, comments, folders and the task-sync routes.
    Task-sync routes also accept an integration token (`oauth2`); every other
    route needs a user session or API key.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Tasks
  - name: Files
  - name: Folders
  - name: Task Schedules
  - name: Distribution
paths:
  /workspaces/entity/{entity_type}/{entity_id}/comment/{id}:
    patch:
      tags:
        - Entity Comments
      summary: Update an entity comment
      description: Only the comment's author can change it.
      operationId: updateEntityComment
      parameters:
        - name: entity_type
          in: path
          required: true
          description: Entity type, letters, digits, `_` or `-`.
          schema:
            type: string
        - name: entity_id
          in: path
          required: true
          description: Entity id, same character set.
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: Comment id.
          schema:
            type: string
        - name: visibility
          in: query
          required: false
          description: >-
            `private` (this account only, default) or `shared` (with the
            connected account).
          schema:
            type: string
            enum:
              - private
              - shared
        - name: counterparty_account_id
          in: query
          required: false
          description: Required to find a shared comment.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEntityCommentRequest'
      responses:
        '200':
          description: The comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityComment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    UpdateEntityCommentRequest:
      type: object
      properties:
        body:
          type: string
        visibility:
          type: string
          enum:
            - private
            - shared
        target:
          $ref: '#/components/schemas/EntityRef'
        mentions:
          type: array
          items:
            type: string
        counterparty_mentions:
          type: array
          items:
            type: string
        attachments:
          type: array
          items:
            type: string
    EntityComment:
      type: object
      properties:
        id:
          type: string
        body:
          type: string
        author:
          type: string
        author_name:
          type: string
        account_id:
          type: string
        reply_id:
          type: string
        visibility:
          type: string
          enum:
            - private
            - shared
        counterparty_account_id:
          type: string
        entity:
          $ref: '#/components/schemas/EntityRef'
        target:
          $ref: '#/components/schemas/EntityRef'
        mentions:
          type: array
          items:
            type: string
        counterparty_mentions:
          type: array
          items:
            type: string
        attachments:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        reactions:
          type: object
          readOnly: true
          additionalProperties:
            type: object
            properties:
              count:
                type: integer
              users:
                type: array
                items:
                  type: string
              reactors:
                type: array
                items:
                  type: object
                  properties:
                    account_id:
                      type: string
                    user_id:
                      type: string
    EntityRef:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
        id:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.