BlocksAPI
Defined in: src/api/blocks.api.ts:113
Blocks API client for working with Notion blocks.
Extends
Section titled “Extends”BaseAPI<NotionBlock,Block>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BlocksAPI(
client):BlocksAPI
Defined in: src/api/blocks.api.ts:120
Parameters
Section titled “Parameters”client
Section titled “client”NotionClient
Returns
Section titled “Returns”BlocksAPI
Overrides
Section titled “Overrides”BaseAPI<NotionBlock, Block>.constructor
Properties
Section titled “Properties”children
Section titled “children”
readonlychildren:object
Defined in: src/api/blocks.api.ts:169
Block children operations.
append
Section titled “append”append: (
blockId,options) =>Promise<AppendBlockChildrenResponse>
Append children blocks to a parent block.
Parameters
Section titled “Parameters”blockId
Section titled “blockId”string
The ID of the parent block
options
Section titled “options”AppendBlockChildrenOptions
Options for appending children
Returns
Section titled “Returns”Promise<AppendBlockChildrenResponse>
Response with appended blocks
https://developers.notion.com/reference/patch-block-children
list: (
blockId,params?) =>Promise<PaginatedList<Block>>
List all children of a block (paginated).
Parameters
Section titled “Parameters”blockId
Section titled “blockId”string
The ID of the parent block
params?
Section titled “params?”Pagination parameters
Returns
Section titled “Returns”Promise<PaginatedList<Block>>
Paginated list of child blocks
https://developers.notion.com/reference/get-block-children
meetingNotes
Section titled “meetingNotes”
readonlymeetingNotes:object
Defined in: src/api/blocks.api.ts:220
Meeting-notes query operations.
query: (
options?) =>Promise<MeetingNotesQueryResult>
Query meeting-notes blocks across the workspace.
Parameters
Section titled “Parameters”options?
Section titled “options?”QueryMeetingNotesOptions
Filter, sort, and limit options
Returns
Section titled “Returns”Promise<MeetingNotesQueryResult>
Matching meeting-notes blocks
https://developers.notion.com/reference/query-meeting-notes
Methods
Section titled “Methods”delete()
Section titled “delete()”delete(
blockId):Promise<Block>
Defined in: src/api/blocks.api.ts:149
Delete (archive) a block.
Parameters
Section titled “Parameters”blockId
Section titled “blockId”string
The ID of the block to delete
Returns
Section titled “Returns”Promise<Block>
The deleted block wrapped in a Block model
https://developers.notion.com/reference/delete-a-block
retrieve()
Section titled “retrieve()”retrieve(
blockId,options?):Promise<Block>
Defined in: src/api/blocks.api.ts:133
Retrieve a block by ID.
Parameters
Section titled “Parameters”blockId
Section titled “blockId”string
The ID of the block to retrieve (with or without dashes)
options?
Section titled “options?”RetrieveBlockOptions
Options for filtering properties
Returns
Section titled “Returns”Promise<Block>
The block wrapped in a Block model
https://developers.notion.com/reference/retrieve-a-block
update()
Section titled “update()”update(
blockId,options):Promise<Block>
Defined in: src/api/blocks.api.ts:162
Update a block’s properties.
Parameters
Section titled “Parameters”blockId
Section titled “blockId”string
The ID of the block to update
options
Section titled “options”UpdateBlockOptions
Options for updating the block
Returns
Section titled “Returns”Promise<Block>
The updated block wrapped in a Block model