List anchored document comments and replies
GET
/v1/knowledge/{libraryId}/documents/{documentId}/commentsRequires knowledge read permission and access to the library. Comments belong to the document, independently of library versions. Results are ordered by creation time and id.
How to call this endpoint
Every ACP API request uses bearer authentication. The examples here show the actual request path, auth header, and body shape that the platform expects.
Path, query, and header parameters
These parameters control which ACP object the endpoint acts on and how the request is processed.
Path parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| libraryId | path | string | Yes | Knowledge library ID |
| documentId | path | string | Yes | Stable Knowledge document ID |
Query parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
| limit | query | integer | No | — |
| offset | query | integer | No | — |
Body schema
This endpoint does not require a request body.
None.
What the API returns
Each response code below includes the documented payload shape for the ACP API.
200Comment pageapplication/json
| Field | Type | Required | Description |
|---|---|---|---|
| object | list | Yes | — |
| data | object[] | Yes | — |
| data[].id | string | Yes | Unique identifier. |
| data[].libraryId | string | Yes | — |
| data[].documentId | string | Yes | Document ID. |
| data[].threadId | string | Yes | Root comment id; equal to id on root comments. |
| data[].authorUserId | string | Yes | — |
| data[].author | object | Yes | — |
| data[].author.id | string | Yes | Unique identifier. |
| data[].author.name | string | Yes | Human-readable name. |
| data[].author.email | string | Yes | — |
| data[].author.avatarUrl | string | Yes | — |
| data[].body | string | Yes | — |
| data[].anchor | object | Yes | — |
| data[].anchor.revisionId | string | Yes | — |
| data[].anchor.start | integer | Yes | UTF-16 offset into rendered text with one newline between text blocks. |
| data[].anchor.end | integer | Yes | Exclusive UTF-16 offset; end minus start equals quote length. |
| data[].anchor.quote | string | Yes | — |
| data[].anchor.prefix | string | Yes | — |
| data[].anchor.suffix | string | Yes | — |
| data[].mentions | object[] | Yes | — |
| data[].mentions[].kind | human | agent | Yes | — |
| data[].mentions[].id | string | Yes | Unique identifier. |
| data[].mentions[].label | string | Yes | — |
| data[].createdAt | string | Yes | ISO 8601 timestamp. |
| has_more | boolean | Yes | — |
| limit | integer | Yes | — |
| offset | integer | Yes | — |
400Invalid pagination
None.
401Authentication required
None.
403Knowledge read permission required
None.
404Document or accessible library not found
None.
List anchored document comments and replies
Loading...
Response 200
Loading...