---
title: "Add a comment"
method: POST
path: "/api/v1/boards/{doc_id}/comments"
tags: ["v1"]
---

# Add a comment

`POST /api/v1/boards/{doc_id}/comments`

## Request

- Base URL: `https://board.noddle.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://board.noddle.dev/api/v1/boards/{doc_id}/comments`
- Auth: none declared

Comment as the caller. Pin to ONE of node_id / edge_id / parent_id
(reply) / a point (x, y). Open editors update live. Supports
``Idempotency-Key``.

## Path parameters

- `doc_id` string, required

## Request body

- CommentCreateIn
  - `body` string, required
  - `page_id` string, nullable
  - `parent_id` string, nullable: Reply to this root comment.
  - `node_id` string, nullable: Pin to a node (follows it).
  - `edge_id` string, nullable: Pin to an edge.
  - `x` number, nullable
  - `y` number, nullable
  - `mentions` string[]

## Response `201`

Successful Response

- CommentOut
  - `id` string, required
  - `body` string, required
  - `author_id` string, nullable, required
  - `author_name` string, required
  - `author_color` string, required
  - `page_id` string, nullable, required
  - `parent_id` string, nullable, required
  - `anchor` object, nullable, required
  - `mentions` string[], required
  - `resolved` boolean, required
  - `created_at` number, required
  - `updated_at` number, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/noddle/apis/noddle-board.md) · [All operations](https://skmtc.dev/noddle/apis/noddle-board/llms.txt) · [OpenAPI document](https://skmtc.dev/noddle/apis/noddle-board/revisions/7f324e389516?raw)
