Join us for our Developer Platform Hackathon, May 16-17. Apply now →
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.comments.create({
parent: { page_id: "b55c9c91-384d-452b-81db-d1ef79372b75" },
rich_text: [{ text: { content: "This is a comment" } }]
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Creates a comment in a page, block or existing discussion thread.
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.comments.create({
parent: { page_id: "b55c9c91-384d-452b-81db-d1ef79372b75" },
rich_text: [{ text: { content: "This is a comment" } }]
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Returns a comment object for the created comment. There are three locations where a new comment can be added with the public API:Documentation Index
Fetch the complete documentation index at: https://developers.notion.com/llms.txt
Use this file to discover all available pages before exploring further.
parent object with a page_id or block_id must be provided in the body params.
To add a new comment to an existing discussion thread, a discussion_id string must be provided in the body params. (Inline comments to start a new discussion thread cannot be created via the public API.)
Either the parent.page_id , parent.block_id or discussion_id parameter must be provided — ONLY one can be specified.
rich_text: An array of rich text objects that represent the content of the comment.markdown: A Markdown string. Comment Markdown supports inline formatting only (bold, italic, strikethrough, inline code, links), inline equations, and mentions. Block-level Markdown such as fenced code blocks, headings, lists, tables, and blockquotes does not render as structured blocks in comments.rich_text or markdown must be provided. Providing both or neither will return a validation error.
To see additional examples of creating a page or discussion comment and to learn more about comments in Notion, see the Working with comments guide.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The API version to use for this request. The latest version is 2026-03-11.
2026-03-11 The parent of the comment. This can be a page or a block.
Show child attributes
An array of rich text objects that represent the content of the comment.
100Show child attributes
An array of files to attach to the comment. Maximum of 3 allowed.
3Show child attributes
Display name for the comment.
Show child attributes