Skip to main content

Method

client.comments.retrieve(args: GetCommentParameters): Promise<GetCommentResponse>

Parameters

comment_id
string
required
The ID of the comment to retrieve.
auth
string
Bearer token for authentication. If not provided, the client-level auth is used.

Response

Returns a Comment object.
object
string
Always "comment".
id
string
The ID of the comment.
parent
object
The parent of the comment (page or block).
discussion_id
string
The ID of the discussion thread this comment belongs to.
rich_text
array
The rich text content of the comment.
created_time
string
The time when the comment was created (ISO 8601 format).
last_edited_time
string
The time when the comment was last edited (ISO 8601 format).
created_by
object
The user who created the comment.
display_name
object
The display name of the comment.
attachments
array
Any file attachments associated with the comment.

Example

const comment = await client.comments.retrieve({
  comment_id: "comment-id-123",
})

console.log(comment.rich_text)

Build docs developers (and LLMs) love