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

# Cria um novo comentário em tarefa

> Cria comentário interno ou comentário de cliente em uma tarefa, conforme o campo `client`.



## OpenAPI

````yaml /api-reference/tarefas.yaml post /v2/comments
openapi: 3.0.0
info:
  title: Tarefy API
  description: >-
    Tarefy REST API — platform for team management, tasks, culture, and
    performance.


    Versioned endpoints are available under `/v2/...`. Authenticate with a
    Bearer JWT in the `Authorization` header.


    To get started, see the [authentication guide](/authentication) and the
    [quickstart](/quickstart).
  version: 2.0.0
  contact:
    name: Tarefy Support
    email: suporte@tarefy.com
    url: https://tarefy.com
  license:
    name: Proprietary
servers:
  - url: https://app.tarefy.com/nodeapi
    description: Production
security:
  - bearerAuth: []
tags: []
paths:
  /v2/comments:
    post:
      tags:
        - Comments
      summary: Cria um novo comentário em tarefa
      description: >-
        Cria comentário interno ou comentário de cliente em uma tarefa, conforme
        o campo `client`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                taskId:
                  type: integer
                content:
                  type: string
                client:
                  type: boolean
                  description: >-
                    Quando true, cria comentário de cliente. Quando
                    false/ausente, cria comentário interno.
                mentions:
                  type: string
                  description: Lista de IDs de usuários mencionados, separados por vírgula.
              required:
                - taskId
                - content
      responses:
        '200':
          description: Comentário criado com sucesso
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCommentResponse'
components:
  schemas:
    CreateCommentResponse:
      type: object
      properties:
        status:
          type: boolean
        comment:
          $ref: '#/components/schemas/TaskComment'
        message:
          type: string
    TaskComment:
      type: object
      required:
        - id
        - content
        - isClient
        - isClientVisible
        - createdAt
      properties:
        id:
          type: integer
          example: 9801
        content:
          type: string
          description: Conteúdo HTML do comentário.
          example: <p>Comentário interno da equipe.</p>
        type:
          type: string
          nullable: true
          description: >-
            Tipo técnico do comentário, por exemplo `system`; comentários
            normais costumam retornar null.
          example: null
        isClient:
          type: boolean
          description: Indica se é comentário de cliente.
          example: false
        isClientVisible:
          type: boolean
          description: Indica se o comentário é visível ao cliente.
          example: false
        createdAt:
          type: string
          format: date-time
          example: '2026-06-02T13:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          nullable: true
          example: '2026-06-02T13:30:00.000Z'
        editedAt:
          type: string
          format: date-time
          nullable: true
          example: null
        mentions:
          type: string
          nullable: true
          description: IDs de usuários mencionados separados por vírgula.
          example: 12, 34
        author:
          $ref: '#/components/schemas/CommentAuthor'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/CommentAttachment'
        hasRead:
          type: boolean
          description: Indica se o usuário autenticado já leu esse comentário.
          example: true
    CommentAuthor:
      type: object
      nullable: true
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          nullable: true
        profilePhoto:
          type: string
          nullable: true
    CommentAttachment:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        file:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        JWT token obtained from `/v2/auth/login`. Send it in the header:
        `Authorization: Bearer <your_token>`

````