Skip to content

CommentsAPI

Defined in: src/api/comments.api.ts:82

Comments API client for working with Notion comments.

new CommentsAPI(client): CommentsAPI

Defined in: src/api/comments.api.ts:89

NotionClient

CommentsAPI

BaseAPI<NotionComment, Comment>.constructor

create(options): Promise<Comment>

Defined in: src/api/comments.api.ts:119

Create a new comment on a page or block.

CreateCommentOptions

Options for creating the comment

Promise<Comment>

The created comment wrapped in a Comment model

https://developers.notion.com/reference/create-a-comment


delete(commentId): Promise<Comment>

Defined in: src/api/comments.api.ts:157

Delete a comment. A connection can only delete comments it created.

string

The ID of the comment to delete

Promise<Comment>

The deleted comment wrapped in a Comment model

https://developers.notion.com/reference/delete-a-comment


list(parentId, params?): Promise<PaginatedList<Comment>>

Defined in: src/api/comments.api.ts:102

Retrieve all comments from a page or block (paginated).

string

The ID of the parent page, block, or database

PaginationParameters

Pagination parameters

Promise<PaginatedList<Comment>>

Paginated list of comments

https://developers.notion.com/reference/retrieve-a-comment


update(commentId, options): Promise<Comment>

Defined in: src/api/comments.api.ts:140

Update an existing comment’s content.

string

The ID of the comment to update

UpdateCommentOptions

The updated comment content (rich_text or markdown)

Promise<Comment>

The updated comment wrapped in a Comment model

https://developers.notion.com/reference/update-a-comment