---
title: "Create a selector, screenshot, or general comment for a Web App Review."
method: POST
path: "/api/v1/web-app-reviews/{reviewId}/comments"
tags: ["Web App reviews"]
---

# Create a selector, screenshot, or general comment for a Web App Review.

`POST /api/v1/web-app-reviews/{reviewId}/comments`

## Request

- Base URL: `https://commentary.dev`
- URL: `https://commentary.dev/api/v1/web-app-reviews/{reviewId}/comments`
- Auth: HTTP bearer

## Path parameters

- `reviewId` string, required

## Headers

- `X-Commentary-Workspace-Id` string
- `X-Correlation-Id` string

## Request body

- union
  - object
    - `targetKind` 'general', required
    - `bodyMarkdown` string, required
    - `reviewSessionId` string, nullable
    - `route` string
    - `url` string, uri
  - object
    - `route` string, required
    - `url` string, uri, required
    - `origin` string, required
    - `selector` string, required
    - `fallbackSelector` string, required
    - `tagName` string, required
    - `role` string, nullable
    - `accessibleName` string, nullable
    - `textSnippet` string, nullable
    - `boundingRect` object, required
    - `viewport` object, required
    - `component` object, nullable
    - `commitSha` string, nullable
    - `targetKind` 'element'
    - `bodyMarkdown` string, required
    - `reviewSessionId` string, nullable
  - object
    - `targetKind` 'screenshot', required
    - `route` string, required
    - `url` string, uri, required
    - `origin` string, required
    - `viewport` object, required
    - `screenshot` object, required
      - `mimeType` 'image/png' | 'image/jpeg' | 'image/webp', required
      - `dataUrl` string
      - `base64` string
      - `width` number, required
      - `height` number, required
      - `screenshotRect` object, required
      - `cursorPage` object, required
      - `cursorImage` object, required
    - `commitSha` string, nullable
    - `bodyMarkdown` string, required
    - `reviewSessionId` string, nullable

## Response `201`

Successful response.

- object
  - `ok` unknown
  - `comment` WebAppReviewComment
    - `id` string
    - `threadId` string
    - `reviewId` string
    - `targetKind` 'element' | 'screenshot' | 'general'
    - `bodyMarkdown` string
    - `status` 'open' | 'resolved'
    - `route` string
    - `url` string
    - `selector` string
    - `fallbackSelector` string
    - `element` object
    - `boundingRect` object
    - `viewport` object
    - `component` object, nullable
    - `screenshot` object, nullable
    - `commitSha` string, nullable
    - `author` object
      - `login` string
      - `viewerId` string, nullable
      - `agentAlias` string, nullable: Stable per-agent identifier for agent-authored activity. clientName is not a substitute; the connected human identity remains visible.
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required.
- `403`: The token or session does not have permission for this resource.
- `404`: The resource was not found.
- `429`: The request was rate limited.

---

[API](https://skmtc.dev/commentary/apis/commentary-public-api.md) · [All operations](https://skmtc.dev/commentary/apis/commentary-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/commentary/apis/commentary-public-api/revisions/7aaafc198c52?raw)
