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

# Create record comment

> Add a new comment to a table record.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/records/{record_id}/comments
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/records/{record_id}/comments:
    post:
      tags:
        - Records
      summary: Create record comment
      description: Add a new comment to a table record.
      parameters:
        - schema:
            type: string
          required: true
          description: Org ID
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: Record ID
          name: record_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableRecordCommentSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateTableRecordCommentSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableRecordCommentSchema'
components:
  schemas:
    CreateTableRecordCommentSchema:
      type: object
      properties:
        id:
          type: string
          maxLength: 128
          description: >-
            Client-generated id for the new comment (enables optimistic
            creation). Encoded (`act_…`) or raw UUID. Rejected if already in
            use.
        comment:
          type: string
          maxLength: 2048
          description: The content of the comment (max 2048 characters)
        attachments:
          type: array
          items:
            type: string
            maxLength: 128
          maxItems: 20
          description: Array of file IDs to attach to the comment
        references:
          type: array
          items:
            $ref: '#/components/schemas/ModelReferenceSchema'
          maxItems: 20
          description: >-
            The entities tagged by name in the comment (`@Name` in the text). A
            tagged agent answers in the thread; the org id tags Ask Invent
        context:
          $ref: '#/components/schemas/ChatMessageContextSchema'
      description: Schema for creating a table record comment
    TableRecordCommentSchema:
      type: object
      properties:
        id:
          type: string
        actor:
          allOf:
            - $ref: '#/components/schemas/UserLimitedSchema'
            - description: User who posted the comment
        agent:
          allOf:
            - $ref: '#/components/schemas/AgentLimitedSchema'
            - description: Agent who posted the comment
        record_id:
          type: string
        chat:
          allOf:
            - $ref: '#/components/schemas/ChatLimitedSchema'
            - description: The run that answered a tag with this comment
        metadata:
          $ref: '#/components/schemas/ActivityMetadataSchema'
        comment:
          type:
            - string
            - 'null'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/FileSchema'
          description: Files attached to the comment
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - record_id
        - comment
        - attachments
        - created_at
        - updated_at
      description: Schema for a table record comment
    ModelReferenceSchema:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/ModelReferenceKindSchema'
        id:
          type: string
          description: Public id of the referenced entity
        name:
          type: string
          description: Display name, snapshotted when the text was written
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            The entity's own icon or emoji, filled on write. Null = the default
            of its kind
        icon_url:
          type:
            - string
            - 'null'
          format: uri
          description: The entity's image, filled on write, when it has one
        color:
          type:
            - string
            - 'null'
          enum:
            - red
            - orange
            - amber
            - yellow
            - lime
            - green
            - teal
            - cyan
            - sky
            - blue
            - indigo
            - violet
            - purple
            - fuchsia
            - pink
            - rose
            - neutral
            - null
          title: Color
          description: The entity's tint, filled on write, when it has one
      required:
        - kind
        - id
        - name
      description: >-
        An entity tagged by name in a text: what an `@Name` in it points at. The
        client sends kind, id and name; the API validates the id and fills the
        visuals
    ChatMessageContextSchema:
      type: object
      properties:
        page_url:
          type: string
          maxLength: 2048
          format: uri
          description: The full URL of the page the user is on
        page_title:
          type: string
          maxLength: 256
          description: The title of the page the user is on
        timezone:
          type: string
          description: The sender's timezone
      description: >-
        Ephemeral context about where the user is when sending the message.
        Injected into the prompt on the fly, never stored.
    UserLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        email:
          type: string
          format: email
        avatar:
          type:
            - string
            - 'null'
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - email
        - avatar
        - seen_at
      description: The assigned user for the conversation
    AgentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            A picked icon or emoji. Null = the generated face, unless a custom
            image is set.
        color:
          allOf:
            - $ref: '#/components/schemas/ColorNameSchema'
            - description: >-
                The identity color, reused by every surface that carries the
                agent
        shape:
          anyOf:
            - $ref: '#/components/schemas/AgentShapeSchema'
            - type: 'null'
          description: >-
            The silhouette of the generated face. Null when an icon or a custom
            image is set.
        avatar_url:
          type:
            - string
            - 'null'
          description: >-
            The agent as an image, either the custom picture or the PNG snapshot
            of its face or icon
      required:
        - id
        - name
        - icon
        - color
        - shape
        - avatar_url
      description: A reduced agent reference
    ChatLimitedSchema:
      type: object
      properties:
        id:
          type: string
        title:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELED
        state:
          $ref: '#/components/schemas/ChatLimitedStateSchema'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - title
        - status
        - created_at
      description: >-
        The chat behind the comment: the conversation a note was written in, or
        the run that answered a tag
    ActivityMetadataSchema:
      oneOf:
        - $ref: '#/components/schemas/ContactUpdatedMetadataSchema'
        - $ref: '#/components/schemas/CommentCreatedMetadataSchema'
      discriminator:
        propertyName: type
        mapping:
          contact_updated:
            $ref: '#/components/schemas/ContactUpdatedMetadataSchema'
          comment_created:
            $ref: '#/components/schemas/CommentCreatedMetadataSchema'
      description: >-
        Activity metadata payload. Discriminated by `type`, which mirrors the
        parent activity row `type`.
    FileSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        file_path:
          type: string
          maxLength: 2048
          description: Path to the file in the storage system
        file_filename:
          type: string
          maxLength: 255
          description: Name of the file
          example: document.pdf
        file_size:
          type: number
          description: Size of the file in bytes
          example: 1024
        file_mimetype:
          type: string
          maxLength: 255
          description: MIME type of the file
          example: application/pdf
        file_url:
          type: string
          maxLength: 2048
          description: URL to access the file
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the file was created
      required:
        - id
        - file_path
        - file_filename
        - file_size
        - file_mimetype
        - file_url
        - created_at
      description: Detailed information about a file
    ModelReferenceKindSchema:
      type: string
      enum:
        - agent
        - routine
        - contact
        - user
        - skill
        - record
        - table
        - assistant
      description: The kind of entity a reference points at
    PickerIconEmojiSchema:
      type: string
      format: emoji
      description: >-
        The emoji of a curated icon a user can pick for a table, view, field, or
        other entity
    PickerIconNameSchema:
      type: string
      enum:
        - TableCellsIcon
        - DatabaseIcon
        - DocumentTextIcon
        - DocumentChartBarIcon
        - ClipboardDocumentListIcon
        - ClipboardDocumentCheckIcon
        - FolderIcon
        - ArchiveBoxIcon
        - InboxIcon
        - BookOpenIcon
        - BookmarkIcon
        - NewspaperIcon
        - RectangleStackIcon
        - PencilSquareIcon
        - UserIcon
        - UsersIcon
        - UserGroupIcon
        - UserPlusIcon
        - IdentificationIcon
        - FaceSmileIcon
        - HandThumbUpIcon
        - HeartIcon
        - StarIcon
        - CheckBadgeIcon
        - TrophyIcon
        - CrownIcon
        - ChatBubbleLeftIcon
        - ChatBubbleLeftRightIcon
        - EnvelopeIcon
        - EnvelopeOpenIcon
        - PhoneIcon
        - DevicePhoneMobileIcon
        - MegaphoneIcon
        - BellIcon
        - PaperAirplaneIcon
        - AtSymbolIcon
        - RssIcon
        - LifebuoyIcon
        - ShoppingCartIcon
        - ShoppingBagIcon
        - BuildingStorefrontIcon
        - CreditCardIcon
        - BanknotesIcon
        - CurrencyDollarIcon
        - CurrencyEuroIcon
        - ReceiptPercentIcon
        - WalletIcon
        - CoinsIcon
        - GiftIcon
        - TagIcon
        - TicketIcon
        - ScaleIcon
        - TruckIcon
        - CubeIcon
        - CalendarIcon
        - CalendarDaysIcon
        - CalendarDateRangeIcon
        - ClockIcon
        - FlagIcon
        - CheckCircleIcon
        - ListBulletIcon
        - QueueListIcon
        - FunnelIcon
        - ChartBarIcon
        - ChartPieIcon
        - PresentationChartLineIcon
        - ArrowTrendingUpIcon
        - BriefcaseIcon
        - WrenchScrewdriverIcon
        - Cog6ToothIcon
        - KeyIcon
        - LockClosedIcon
        - ShieldCheckIcon
        - BoltIcon
        - LightBulbIcon
        - BeakerIcon
        - BugAntIcon
        - CpuChipIcon
        - CodeBracketIcon
        - CommandLineIcon
        - ServerIcon
        - LinkIcon
        - HomeIcon
        - HomeModernIcon
        - BuildingOfficeIcon
        - BuildingOffice2Icon
        - BuildingLibraryIcon
        - MapPinIcon
        - MapIcon
        - GlobeAltIcon
        - GlobeAmericasIcon
        - RocketLaunchIcon
        - PlaneIcon
        - CarIcon
        - SunIcon
        - MoonIcon
        - FireIcon
        - SparklesIcon
        - CakeIcon
        - AcademicCapIcon
        - ScissorsIcon
        - SwatchIcon
        - PaintBrushIcon
        - CoffeeIcon
        - UtensilsIcon
        - LeafIcon
        - DumbbellIcon
        - HeartPulseIcon
        - PawPrintIcon
        - StethoscopeIcon
        - CameraIcon
        - PhotoIcon
        - FilmIcon
        - VideoCameraIcon
        - MicrophoneIcon
        - MusicalNoteIcon
        - SpeakerWaveIcon
        - PlayCircleIcon
        - TvIcon
        - RadioIcon
        - PuzzlePieceIcon
        - GamepadIcon
      description: >-
        The name of a curated icon a user can pick for a table, view, field, or
        other entity
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      title: Color
      description: The name of the color to use in the UI
    AgentShapeSchema:
      type: string
      enum:
        - square
        - round
        - pebble
        - slate
        - beam
        - bloom
        - arch
        - clave
      description: The silhouette of a generated agent face
    ChatLimitedStateSchema:
      type: object
      properties:
        state:
          $ref: '#/components/schemas/ChatStateStatusSchema'
        ai_enabled:
          type: boolean
        admin_unseen_count:
          type: number
        muted_until:
          type:
            - string
            - 'null'
          format: date-time
        follow_up_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - state
        - ai_enabled
        - admin_unseen_count
        - muted_until
        - follow_up_at
    ContactUpdatedMetadataSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - contact_updated
        changes:
          type: array
          items:
            $ref: '#/components/schemas/ContactUpdatedChangeSchema'
          minItems: 1
      required:
        - type
        - changes
      description: Metadata payload for the `contact_updated` activity type
    CommentCreatedMetadataSchema:
      type: object
      properties:
        type:
          type: string
          enum:
            - comment_created
        references:
          type: array
          items:
            $ref: '#/components/schemas/ModelReferenceSchema'
          description: The entities tagged by name in the comment
      required:
        - type
        - references
      description: Metadata payload for a `comment_created` activity that tags entities
    ChatStateStatusSchema:
      type: string
      enum:
        - OPEN
        - CLOSED
      options:
        OPEN:
          label: Open
        CLOSED:
          label: Resolved
      title: Status
      description: The state status of the chat
    ContactUpdatedChangeSchema:
      type: object
      properties:
        key:
          type: string
          description: 'The changed field: `name`, `email`, `phone`, `username` or `user_id`'
        old_value: {}
        new_value: {}
      required:
        - key
      description: A single field change recorded on a contact_updated activity
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````