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

# Start a comment thread on a file, site page, order, or asset. The comment is attributed to the API key's creator.



## OpenAPI

````yaml /api-reference/openapi.json post /comment-threads
openapi: 3.1.0
info:
  title: Replo Public API
  version: '2026-10-05'
servers:
  - url: https://api.replo.app/v1
security: []
paths:
  /comment-threads:
    post:
      tags:
        - Comment-threads
      summary: >-
        Start a comment thread on a file, site page, order, or asset. The
        comment is attributed to the API key's creator.
      operationId: commentThreads.create
      parameters:
        - name: Replo-Api-Version
          in: header
          required: true
          schema:
            type: string
            enum:
              - '2026-10-05'
          description: The public API version to use for this request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  description: >-
                    Client-generated thread id. Send the same id and commentId
                    on a retry to get the existing thread back.
                commentId:
                  type: string
                  format: uuid
                  description: Client-generated first-comment id. Required with id.
                target:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - file
                        fileId:
                          type: string
                          format: uuid
                      required:
                        - kind
                        - fileId
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - sitePage
                        siteId:
                          type: string
                          format: uuid
                        url:
                          type: string
                          minLength: 1
                          description: >-
                            The page path, URL or route pattern the comment is
                            on, e.g. "/about" or "/products/[handle]". Stored
                            without the locale prefix, and a route pattern
                            without its [lang] segment.
                        locale:
                          type: string
                          description: The locale prefix in url, if any.
                      required:
                        - kind
                        - siteId
                        - url
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - order
                        orderId:
                          type: string
                          format: uuid
                      required:
                        - kind
                        - orderId
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - asset
                        assetId:
                          type: string
                          format: uuid
                      required:
                        - kind
                        - assetId
                      additionalProperties: false
                anchor:
                  $ref: '#/components/schemas/CommentAnchorInput'
                body:
                  type: string
                  minLength: 1
                  description: >-
                    Markdown (GFM) parsed as MDX. To mention someone, insert
                    `<Mention data='<mentionable JSON>' />`. Expressions in
                    braces, raw HTML and any other JSX are rejected, so escape a
                    literal `{` or `<` with a backslash. Images must be hosted
                    on assets.replocdn.com.
              required:
                - target
                - body
              additionalProperties: false
      responses:
        '201':
          description: >-
            Start a comment thread on a file, site page, order, or asset. The
            comment is attributed to the API key's creator.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentThread'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '401':
          description: Missing or invalid Replo Public API token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '403':
          description: You are not authorized to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '409':
          description: The resource is in a conflicting state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '413':
          description: File content exceeds the 10 MiB limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '429':
          description: >-
            Too many requests. Please retry after the time indicated by the
            Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '500':
          description: An internal error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
        '503':
          description: Service temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    CommentAnchorInput:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - none
          required:
            - type
          additionalProperties: false
          description: The thread is on the whole target.
        - type: object
          properties:
            type:
              type: string
              enum:
                - point
            page:
              type: integer
              minimum: 0
              description: Zero-based page, for multi-page files such as PDFs.
            x:
              type: number
              minimum: 0
              maximum: 1
              description: Fraction of the target's width.
            'y':
              type: number
              minimum: 0
              maximum: 1
              description: Fraction of the target's height.
          required:
            - type
            - x
            - 'y'
          additionalProperties: false
          description: >-
            A point on the target, in fractions of its size. Only file and asset
            targets take points.
      description: >-
        Where on the target to start the thread; omit or pass type none for the
        whole target. Point anchors work only on file and asset targets; site
        page and order threads must use none.
    CommentThread:
      type: object
      properties:
        object:
          type: string
          enum:
            - comment_thread
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        target:
          oneOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - file
                fileId:
                  type: string
                  format: uuid
              required:
                - kind
                - fileId
              additionalProperties: false
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - sitePage
                siteId:
                  type: string
                  format: uuid
                path:
                  type: string
                  description: >-
                    The page the thread is on, without its locale prefix: a path
                    such as /about, or a route pattern such as
                    /products/[handle].
              required:
                - kind
                - siteId
                - path
              additionalProperties: false
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - order
                orderId:
                  type: string
                  format: uuid
              required:
                - kind
                - orderId
              additionalProperties: false
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - asset
                assetId:
                  type: string
                  format: uuid
              required:
                - kind
                - assetId
              additionalProperties: false
        anchor:
          $ref: '#/components/schemas/CommentAnchor'
        status:
          type: string
          enum:
            - open
            - resolved
          description: CommentThreadStatus
        resolvedAt:
          type:
            - string
            - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        comments:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
      required:
        - object
        - id
        - projectId
        - target
        - anchor
        - status
        - resolvedAt
        - createdAt
        - updatedAt
        - comments
      additionalProperties: false
    PublicApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
            - doc_url
      required:
        - error
    CommentAnchor:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - none
          required:
            - type
          additionalProperties: false
          description: The thread is on the whole target.
        - type: object
          properties:
            type:
              type: string
              enum:
                - point
            page:
              type: integer
              minimum: 0
              description: Zero-based page, for multi-page files such as PDFs.
            x:
              type: number
              minimum: 0
              maximum: 1
              description: Fraction of the target's width.
            'y':
              type: number
              minimum: 0
              maximum: 1
              description: Fraction of the target's height.
          required:
            - type
            - x
            - 'y'
          additionalProperties: false
          description: >-
            A point on the target, in fractions of its size. Only file and asset
            targets take points.
        - type: object
          properties:
            type:
              type: string
              enum:
                - element
            tagName:
              type: string
            textPreview:
              type: string
              description: The element's visible text when the thread was started.
            quote:
              type:
                - string
                - 'null'
              description: The text the commenter selected, if any.
          required:
            - type
            - tagName
            - textPreview
            - quote
          additionalProperties: false
          description: An element on a page, pinned in the Replo app.
        - type: object
          properties:
            type:
              type: string
              enum:
                - canvas
          required:
            - type
          additionalProperties: false
          description: A pin on a canvas, placed in the Replo app.
      description: Where on the target the thread sits; type none means the whole target.
    Comment:
      type: object
      properties:
        object:
          type: string
          enum:
            - comment
        id:
          type: string
          format: uuid
        threadId:
          type: string
          format: uuid
        author:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            deleted:
              type: boolean
          required:
            - id
            - name
            - deleted
          additionalProperties: false
        source:
          type: string
          enum:
            - ui
            - agent
            - mcp
            - api
          description: >-
            How the comment was written: ui (the Replo app), agent (a Replo
            agent session), mcp or api.
        body:
          type: string
          description: >-
            Markdown (MDX) written by the commenter, who may be outside the
            workspace. Mentions this API key can't read appear as
            `<RedactedMention category="…" />`. Empty when the comment is
            deleted.
        createdAt:
          type: string
          format: date-time
        editedAt:
          type:
            - string
            - 'null'
          format: date-time
        deleted:
          type: boolean
      required:
        - object
        - id
        - threadId
        - author
        - source
        - body
        - createdAt
        - editedAt
        - deleted
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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