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.blocks.children.append({
block_id: "c02fc1d3-db8b-45c5-a222-27595b15aea7",
children: [
{
type: "paragraph",
paragraph: {
rich_text: [{ text: { content: "Hello, world!" } }]
}
}
]
}){
"type": "<string>",
"block": {},
"object": "<string>",
"next_cursor": "<string>",
"has_more": true,
"results": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}Creates and appends new children blocks to the parent block_id specified. Blocks can be parented by other blocks, pages, or databases.
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.blocks.children.append({
block_id: "c02fc1d3-db8b-45c5-a222-27595b15aea7",
children: [
{
type: "paragraph",
paragraph: {
rich_text: [{ text: { content: "Hello, world!" } }]
}
}
]
}){
"type": "<string>",
"block": {},
"object": "<string>",
"next_cursor": "<string>",
"has_more": true,
"results": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}Returns a paginated list of newly created first level children block objects. Existing blocks cannot be moved using this endpoint. Once a block is appended as a child, it can’t be moved elsewhere via the API. For blocks that allow children, we allow up to two levels of nesting in a single request. There is a limit of 100 block children that can be appended by a single API request. Arrays of block children longer than 100 will result in an error.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.
position parameter to insert blocks at a specific location:
| Position type | Description |
|---|---|
{ "type": "end" } | Insert at the end of the parent’s children (default behavior) |
{ "type": "start" } | Insert at the beginning of the parent’s children |
{ "type": "after_block", "after_block": { "id": "<block_id>" } } | Insert after the specified block |
{
"children": [/* blocks */],
"position": { "type": "start" }
}
after parameter is deprecated. Use the position parameter instead, which provides more flexibility including inserting at the start of the children list.If you’re currently using after, migrate to position with type after_block:{ "children": [...], "after": "<block_id>" }{ "children": [...], "position": { "type": "after_block", "after_block": { "id": "<block_id>" } } }after and position in the same request.id doesn’t exist, or if the connection doesn’t have access to the block.
Returns a 400 or 429 HTTP response if the request exceeds the request limits.
Note: Each Public API endpoint can return several possible error codes. To see a full description of each type of error code, see the Error codes section of the Status codes documentation.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 100Show child attributes
Show child attributes
"block""list"Show child attributes