---
title: POST /api/v1/comments
description: Create Comment
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/api/comments/post-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). Group: [comments](../).
:::

Create Comment

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

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

## Request

```sh
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/comments" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"body_markdown":"<body_markdown>","target_guid":"<target_guid>","target_kind":"<target_kind>"}'
```

## Response `201`

The contract carries no example for this response; schema: `CommentRead`. Field-level shape: [interactive explorer](https://entherium.duckdns.org:8443/reference).

## Returns

`CommentRead` — Successful Response

| Field | Type | Description |
| --- | --- | --- |
| `author_id` | `integer` |  |
| `body_markdown` | `string` |  |
| `createtime` | `string` |  |
| `deleted` | `boolean` |  |
| `guid` | `integer` |  |
| `mentions` | `array of object` |  |
| `target_guid` | `integer` |  |
| `target_kind` | `string` |  |
| `updatetime` | `string` |  |

## Parameters

| Parameter | In | Required | Type | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | no | `string` | — | uuid | Optional. |

## Request body

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

## Errors

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

Every error body is `{detail, code?, request_id, doc_url}` — `request_id` is the value to quote, `doc_url` points at the [Errors reference](../../../reference/errors/).
