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

# Create a comment for an entity and branch



## OpenAPI

````yaml /openapi.json post /comments/{entityId}
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /comments/{entityId}:
    post:
      tags:
        - comments
      summary: Create a comment for an entity and branch
      operationId: CommentsController_createComment
      parameters:
        - name: entityId
          required: true
          in: path
          description: Id of the entity (policy, customer, branch, ...)
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          description: 'Optional: the branchId'
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommentInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCommentOutput'
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CommentAlreadyExistsErrorDto'
              examples:
                COMMENT_ALREADY_EXISTS:
                  $ref: '#/components/schemas/CommentAlreadyExistsErrorDto'
          description: ''
components:
  schemas:
    CreateCommentInputBody:
      type: object
      properties:
        comment:
          type: string
          description: Comment content
          maxLength: 10000
      required:
        - comment
    CreateCommentOutput:
      type: object
      properties:
        type:
          type: string
          description: type of entity
        id:
          type: string
          description: id of the entity
      required:
        - type
        - id
    CommentAlreadyExistsErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - COMMENT_ALREADY_EXISTS
        message:
          type: string
          example: Comment already exists for entity {entityId} and branch {branchId}
        details:
          $ref: '#/components/schemas/CommentAlreadyExistsDto'
      required:
        - code
        - message
        - details
    CommentAlreadyExistsDto:
      type: object
      properties:
        entityId:
          type: string
        branchId:
          type: string
      required:
        - entityId
        - branchId

````