API: comments
GET /api/v1/comments
Section titled “GET /api/v1/comments”List 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
Section titled “POST /api/v1/comments”Create Comment
: 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}
Section titled “DELETE /api/v1/comments/{guid}”Delete Comment
: 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}
Section titled “GET /api/v1/comments/{guid}”Get Comment
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}
Section titled “PATCH /api/v1/comments/{guid}”Patch Comment
: 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:
{ "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 |