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

# Atualiza um comentário

> [!NOTE]
>
> **🚀 API v2 (Recomendada)** - Este endpoint está disponível apenas na v2


## OpenAPI

````yaml openapi/openapi-v2.json PUT /comments/{commentId}
openapi: 3.0.0
info:
  title: Documentação de API
  version: '2.0'
servers:
  - url: https://backend-pied-prod.piedadmin.com.br/api/v2
security:
  - bearerAuth: []
tags:
  - name: Request
    description: Tudo sobre orçamentos ou pedidos
  - name: Equipment
    description: Tudo sobre equipamentos
  - name: Company
    description: Tudo sobre empresas de energia
  - name: Custom Field
    description: Tudo sobre campos customizados
  - name: Payments
    description: Tudo sobre pagamentos
  - name: Task Plan
    description: Tudo sobre tarefas (task plans)
  - name: Comments
    description: Tudo sobre comentários vinculados a entidades do workspace
paths:
  /comments/{commentId}:
    put:
      tags:
        - Comments
      summary: Atualiza um comentário
      parameters:
        - $ref: '#/components/parameters/commentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateCommentRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commentDetailResponse'
        '401':
          description: Esta funcionalidade está indisponível no momento
        '404':
          description: Comentário não encontrado ou não pertence ao distribuidor
        '429':
          $ref: '#/components/schemas/429'
        '500':
          $ref: '#/components/schemas/500'
      security:
        - bearerAuth: []
components:
  parameters:
    commentId:
      name: commentId
      in: path
      required: true
      description: ID do comentário
      schema:
        type: string
  schemas:
    '429':
      description: >-
        hardLimit: O limite de requisições por hora foi ultrapassado. Tente
        novamente mais tarde / timeLimit: O limite de 1 minuto de processamento
        de requisição por hora foi atingido. Tente novamente mais tarde
    '500':
      description: Erro na API
    updateCommentRequest:
      type: object
      required:
        - user
        - message
      properties:
        user:
          type: string
          description: ID do usuário que está editando
          example: 507f1f77bcf86cd799439011
        message:
          type: string
          example: Cliente confirmou retorno para segunda-feira.
        fixed:
          type: boolean
          example: true
    commentDetailResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/comment_v2'
    comment_v2:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439016
        parentId:
          type: string
          example: 507f1f77bcf86cd799439014
        parentType:
          type: string
          enum:
            - request
            - company
            - call
            - rehearse
          example: request
        createdAt:
          type: string
          format: date-time
          example: '2026-08-31T10:00:00.000Z'
        message:
          type: string
          example: Cliente pediu retorno até sexta-feira.
        fixed:
          type: boolean
          example: false
        edited:
          type: boolean
          example: false
        user:
          $ref: '#/components/schemas/commentUser'
        replies:
          type: array
          items:
            $ref: '#/components/schemas/commentReply_v2'
    commentUser:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439011
        fullName:
          type: string
          example: João Silva
    commentReply_v2:
      type: object
      properties:
        id:
          type: string
          example: 507f1f77bcf86cd799439015
        commentId:
          type: string
          example: 507f1f77bcf86cd799439016
        createdAt:
          type: string
          format: date-time
          example: '2026-08-31T12:00:00.000Z'
        message:
          type: string
          example: Cliente confirmou recebimento.
        edited:
          type: boolean
          example: false
        user:
          $ref: '#/components/schemas/commentUser'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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