---
title: API: comments
description: REST endpoints tagged comments — generated from the platform's OpenAPI contract (5 operations).
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/api/comments/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

:::note
Generated from the OpenAPI contract — do not edit by hand. Interactive explorer with full schemas: [https://entherium.duckdns.org:8443/reference](https://entherium.duckdns.org:8443/reference); frozen spec for this build: [openapi.json](/developers/api/openapi.json).
:::

## `GET /api/v1/comments`

List Comments

[Open as a page →](./get-comments/)

: list filtered by target.

**Auth:** `Authorization: Bearer <token>` required

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `target_kind` | query | no | `string \| null` |  |
| `target_guid` | query | no | `integer \| null` |  |
| `include_deleted` | query | no | `boolean` |  |
| `limit` | query | no | `integer` |  |
| `offset` | query | no | `integer` |  |

**Responses:**

| Code | Meaning | Body |
| --- | --- | --- |
| `200` | Successful Response | `CommentList` |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

## `POST /api/v1/comments`

Create Comment

[Open as a page →](./post-comments/)

: create a comment, resolve @mentions, record agent mentions as an agent action.

**Auth:** `Authorization: Bearer <token>` required

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | no | `string` | Optional. |

**Request body:** `application/json` — schema `CommentCreate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body_markdown` | `string` | yes |  |
| `target_guid` | `integer` | yes |  |
| `target_kind` | `string` | yes |  |

**Responses:**

| Code | Meaning | Body |
| --- | --- | --- |
| `201` | Successful Response | `CommentRead` |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

## `DELETE /api/v1/comments/{guid}`

Delete Comment

[Open as a page →](./delete-comments-guid/)

: soft-delete.

**Auth:** `Authorization: Bearer <token>` required

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `guid` | path | yes | `integer` |  |
| `Idempotency-Key` | header | no | `string` | Optional. |

**Responses:**

| Code | Meaning | Body |
| --- | --- | --- |
| `200` | Successful Response | `object` |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

## `GET /api/v1/comments/{guid}`

Get Comment

[Open as a page →](./get-comments-guid/)

**Auth:** `Authorization: Bearer <token>` required

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `guid` | path | yes | `integer` |  |

**Responses:**

| Code | Meaning | Body |
| --- | --- | --- |
| `200` | Successful Response | `CommentRead` |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

## `PATCH /api/v1/comments/{guid}`

Patch Comment

[Open as a page →](./patch-comments-guid/)

: PATCH only by author (or superuser).

**Auth:** `Authorization: Bearer <token>` required

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `guid` | path | yes | `integer` |  |
| `Idempotency-Key` | header | no | `string` | Optional. |

**Request body:** `application/json` — schema `CommentUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `body_markdown` | `string \| null` | no |  |

_Example:_

```json
{
  "body_markdown": "Edited: the figure is confirmed by the source."
}
```

**Responses:**

| Code | Meaning | Body |
| --- | --- | --- |
| `200` | Successful Response | `CommentRead` |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |
