> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/api-integrations/business-glossary-apis/comments.md).

# Comments

## List comments

> Returns all comments in the system, ordered by insertion date descending.\
> \
> The two filters (\`resource\_id\` and \`resource\_type\`) can be combined. When neither filter is provided, all comments in the system are returned.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-bg","version":"Truedat 8.11.0"},"paths":{"/api/business_concepts/comments":{"get":{"description":"Returns all comments in the system, ordered by insertion date descending.\n\nThe two filters (`resource_id` and `resource_type`) can be combined. When neither filter is provided, all comments in the system are returned.\n","operationId":"TdBgWeb.CommentController.index","parameters":[{"description":"Return comments for this resource ID.","in":"query","name":"resource_id","required":false,"schema":{"type":"string"}},{"description":"Return comments for this resource type, such as `business_concept`.","in":"query","name":"resource_type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentIndexResponse"}}},"description":"Comments list"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnauthorizedResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnprocessableEntityArrayResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List comments","tags":["Comments"]}}},"components":{"schemas":{"CommentIndexResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of comments","items":{"$ref":"#/components/schemas/Comment"},"type":"array"}},"required":["data"],"title":"CommentIndexResponse","type":"object"},"Comment":{"additionalProperties":false,"properties":{"content":{"description":"Comment content","type":"string"},"created_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"id":{"description":"Comment ID","type":"integer"},"resource_id":{"description":"ID of the resource being commented","type":"integer"},"resource_type":{"description":"Type of the resource (e.g., business_concept)","type":"string"},"user":{"$ref":"#/components/schemas/CommentUser"}},"required":["id","resource_id","resource_type","content","user"],"title":"Comment","type":"object"},"CommentUser":{"additionalProperties":false,"properties":{"full_name":{"description":"User full name","type":"string"},"user_id":{"description":"User ID","type":"integer"},"user_name":{"description":"User name","type":"string"}},"required":["user_id","user_name"],"title":"CommentUser","type":"object"},"TdBgUnauthorizedResponse":{"properties":{"errors":{"properties":{"message":{"type":"string"}},"type":"object"}},"title":"TdBgUnauthorizedResponse","type":"object"},"TdBgUnprocessableEntityArrayResponse":{"properties":{"errors":{"items":{"properties":{"code":{"type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"title":"TdBgUnprocessableEntityArrayResponse","type":"object"},"TdBgInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgInternalServerErrorResponse","type":"object"}}}}
```

## Create comment

> Creates a comment for the specified resource.\
> \
> \*\*Request body:\*\*\
> \- \`comment\` (required) – Object containing at least:\
> &#x20; \- \`content\` (string) – Comment body.\
> &#x20; \- \`resource\_id\` (integer) – ID of the resource the comment refers to.\
> &#x20; \- \`resource\_type\` (string) – Type of the resource. Supported values are \`business\_concept\` and \`ingest\`.\
> \
> The author identity is taken from the authenticated user; author fields in the request are ignored. The response includes a \`Location\` header pointing to the created comment.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-bg","version":"Truedat 8.11.0"},"paths":{"/api/business_concepts/comments":{"post":{"description":"Creates a comment for the specified resource.\n\n**Request body:**\n- `comment` (required) – Object containing at least:\n  - `content` (string) – Comment body.\n  - `resource_id` (integer) – ID of the resource the comment refers to.\n  - `resource_type` (string) – Type of the resource. Supported values are `business_concept` and `ingest`.\n\nThe author identity is taken from the authenticated user; author fields in the request are ignored. The response includes a `Location` header pointing to the created comment.\n","operationId":"TdBgWeb.CommentController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreateRequest"}}},"description":"Comment payload","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreateResponse"}}},"description":"Comment created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnauthorizedResponse"}}},"description":"Unauthorized"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnprocessableEntityObjectResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create comment","tags":["Comments"]}}},"components":{"schemas":{"CommentCreateRequest":{"additionalProperties":false,"properties":{"comment":{"additionalProperties":false,"properties":{"content":{"description":"Text of the comment.","type":"string"},"resource_id":{"description":"ID of the resource to comment on.","type":"integer"},"resource_type":{"description":"Type of the resource to comment on.","type":"string"}},"required":["resource_id","resource_type","content"],"type":"object"}},"required":["comment"],"title":"CommentCreateRequest","type":"object"},"CommentCreateResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Comment"}},"required":["data"],"title":"CommentCreateResponse","type":"object"},"Comment":{"additionalProperties":false,"properties":{"content":{"description":"Comment content","type":"string"},"created_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"id":{"description":"Comment ID","type":"integer"},"resource_id":{"description":"ID of the resource being commented","type":"integer"},"resource_type":{"description":"Type of the resource (e.g., business_concept)","type":"string"},"user":{"$ref":"#/components/schemas/CommentUser"}},"required":["id","resource_id","resource_type","content","user"],"title":"Comment","type":"object"},"CommentUser":{"additionalProperties":false,"properties":{"full_name":{"description":"User full name","type":"string"},"user_id":{"description":"User ID","type":"integer"},"user_name":{"description":"User name","type":"string"}},"required":["user_id","user_name"],"title":"CommentUser","type":"object"},"TdBgUnauthorizedResponse":{"properties":{"errors":{"properties":{"message":{"type":"string"}},"type":"object"}},"title":"TdBgUnauthorizedResponse","type":"object"},"TdBgUnprocessableEntityObjectResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgUnprocessableEntityObjectResponse","type":"object"},"TdBgInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgInternalServerErrorResponse","type":"object"}}}}
```

## Get comment by id

> Retrieve a single comment by its ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-bg","version":"Truedat 8.11.0"},"paths":{"/api/business_concepts/comments/{id}":{"get":{"description":"Retrieve a single comment by its ID.\n","operationId":"TdBgWeb.CommentController.show","parameters":[{"description":"Comment ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentShowResponse"}}},"description":"Comment"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnauthorizedResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get comment by id","tags":["Comments"]}}},"components":{"schemas":{"CommentShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Comment"}},"required":["data"],"title":"CommentShowResponse","type":"object"},"Comment":{"additionalProperties":false,"properties":{"content":{"description":"Comment content","type":"string"},"created_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"id":{"description":"Comment ID","type":"integer"},"resource_id":{"description":"ID of the resource being commented","type":"integer"},"resource_type":{"description":"Type of the resource (e.g., business_concept)","type":"string"},"user":{"$ref":"#/components/schemas/CommentUser"}},"required":["id","resource_id","resource_type","content","user"],"title":"Comment","type":"object"},"CommentUser":{"additionalProperties":false,"properties":{"full_name":{"description":"User full name","type":"string"},"user_id":{"description":"User ID","type":"integer"},"user_name":{"description":"User name","type":"string"}},"required":["user_id","user_name"],"title":"CommentUser","type":"object"},"TdBgUnauthorizedResponse":{"properties":{"errors":{"properties":{"message":{"type":"string"}},"type":"object"}},"title":"TdBgUnauthorizedResponse","type":"object"},"TdBgNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgNotFoundResponse","type":"object"},"TdBgInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgInternalServerErrorResponse","type":"object"}}}}
```

## Delete comment

> Delete the specified comment by its ID.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-bg","version":"Truedat 8.11.0"},"paths":{"/api/business_concepts/comments/{id}":{"delete":{"description":"Delete the specified comment by its ID.\n","operationId":"TdBgWeb.CommentController.delete","parameters":[{"description":"Comment ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Comment deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgUnauthorizedResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdBgInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete comment","tags":["Comments"]}}},"components":{"schemas":{"TdBgUnauthorizedResponse":{"properties":{"errors":{"properties":{"message":{"type":"string"}},"type":"object"}},"title":"TdBgUnauthorizedResponse","type":"object"},"TdBgNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgNotFoundResponse","type":"object"},"TdBgInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdBgInternalServerErrorResponse","type":"object"}}}}
```
