---
title: "Create a draft or Brainstorming Review session, optionally with initial file content."
method: POST
path: "/api/v1/draft-reviews"
tags: ["Draft reviews"]
---

# Create a draft or Brainstorming Review session, optionally with initial file content.

`POST /api/v1/draft-reviews`

## Request

- Base URL: `https://commentary.dev`
- URL: `https://commentary.dev/api/v1/draft-reviews`
- Auth: HTTP bearer

File content fields are literal UTF-8 payloads. Commentary never treats submitted paths as local files to read.

## Headers

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

## Request body

- CreateDraftReviewRequest
  - `title` string, required
  - `description` string
  - `mode` 'draft' | 'brainstorming'
  - `sourceType` 'api' | 'mcp' | 'cli' | 'agent_api'
  - `agentAlias` string, nullable: Stable per-agent identifier for agent-authored activity. clientName is not a substitute; the connected human identity remains visible.
  - `files` DraftReviewFileInput[]
    - `path` string
    - `fileId` string
    - `content` string
    - `assetUploadId` string: Single-use raster upload id returned by the asset preparation endpoint. Mutually exclusive with content.
    - `contentType` 'markdown' | 'html' | 'plain_text' | 'image' | 'svg' | 'mermaid' | 'auto'
  - `gitBase` DraftGitBase, nullable
    - `provider` 'github'
    - `owner` string
    - `repo` string
    - `ref` string, nullable
    - `sha` string, nullable
    - `path` string, nullable
    - `metadata` object, nullable
  - `base` DraftGitBase, nullable
    - `provider` 'github'
    - `owner` string
    - `repo` string
    - `ref` string, nullable
    - `sha` string, nullable
    - `path` string, nullable
    - `metadata` object, nullable

## Response `201`

Successful response.

- object
  - `ok` unknown
  - `draftReview` DraftReview
    - `id` string
    - `title` string
    - `mode` 'draft' | 'brainstorming'
    - `description` string, nullable
    - `sourceType` string
    - `status` 'active' | 'archived'
    - `visibility` string
    - `gitBase` DraftGitBase, nullable
      - `provider` 'github'
      - `owner` string
      - `repo` string
      - `ref` string, nullable
      - `sha` string, nullable
      - `path` string, nullable
      - `metadata` object, nullable
    - `reviewUrl` string, uri
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `planOfRecordRevision` object, nullable
      - `id` string
      - `revisionNumber` number
      - `summary` string, nullable
      - `createdAt` string, date-time
    - `files` DraftReviewFile[]
      - `id` string
      - `path` string
      - `displayName` string
      - `contentType` 'markdown' | 'html' | 'plain_text' | 'image' | 'svg' | 'mermaid'
      - `currentRevisionId` string, nullable
      - `createdAt` string, date-time
      - `updatedAt` string, date-time
    - `latestRevision` DraftRevision
      - `id` string
      - `revisionNumber` integer
      - `label` string
      - `origin` string
      - `summary` 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
      - `files` object[]
  - `sessionId` string
  - `reviewUrl` string, uri

## 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)
