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

# Create a comment with optional image attachments



## OpenAPI

````yaml https://api.wirespeed.co/v1/openapi.json post /v1/timeline/comments
openapi: 3.0.0
info:
  title: Wirespeed API
  description: The public Wirespeed API. v1 is the first stable contract.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.wirespeed.co
security: []
tags: []
paths:
  /v1/timeline/comments:
    post:
      tags:
        - Timeline
      summary: Create a comment with optional image attachments
      operationId: TimelineController_createComment
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateCommentDto'
                - type: object
                  properties:
                    files:
                      type: array
                      maxItems: 10
                      description: Up to 10 image files; each file must be 5 MB or smaller
                      items:
                        type: string
                        format: binary
                        description: Image file, maximum 5 MB
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpError'
      security:
        - bearer: []
components:
  schemas:
    CreateCommentDto:
      type: object
      properties:
        entityId:
          type: string
          description: Entity ID to attach the comment to
        entityType:
          type: string
          enum:
            - CASE
            - DETECTION
          description: Type of entity
        content:
          type: string
          description: Comment text content
      required:
        - entityId
        - entityType
        - content
    CommentResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the comment
        authorName:
          type: string
          description: >-
            Display name of the comment author, falls back to email if user was
            deleted or name cannot be found
        authorId:
          type: string
          nullable: true
          description: User ID of the comment author, null if user was deleted
        content:
          type: string
          description: Text content of the comment, empty if deleted
        createdAt:
          type: string
          description: Timestamp when the comment was created
        updatedAt:
          type: string
          description: Timestamp when the comment was last updated
        deleted:
          type: boolean
          description: Whether the comment has been soft-deleted
        attachments:
          description: Image attachments on this comment
          type: array
          items:
            $ref: '#/components/schemas/CommentAttachmentResponse'
      required:
        - id
        - authorName
        - authorId
        - content
        - createdAt
        - updatedAt
        - deleted
        - attachments
    HttpError:
      type: object
      properties:
        message:
          type: string
        statusCode:
          type: number
      required:
        - message
        - statusCode
    CommentAttachmentResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the attachment
        filename:
          type: string
          description: Original filename of the uploaded image
        contentType:
          type: string
          description: MIME type of the attachment
        size:
          type: number
          description: File size in bytes
        data:
          type: string
          description: Base64-encoded file data
        createdAt:
          type: string
          description: Timestamp when the attachment was uploaded
      required:
        - id
        - filename
        - contentType
        - size
        - data
        - createdAt
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: >-
        Team API key sent as a Bearer token. Create a key in Wirespeed under
        Settings → Team. See
        https://docs.wirespeed.co/api-reference/authentication.

````