appendBlockList

abstract suspend fun appendBlockList(parentId: UuidString, blocks: MutableBlockList)

Appends new blocks as children to a specified parent object (page or block). This method allows you to add multiple blocks at once using a MutableBlockList.

Parameters

parentId

The unique identifier of the parent page or block

blocks

The list of blocks to append

See also

Throws

NotionApiException

if the parent object doesn't exist, the blocks are invalid, or the API request fails


abstract suspend fun appendBlockList(parentId: UuidString, blocks: BlockListProducer)

Appends new blocks as children to a specified parent object using a block producer. This overload allows for more dynamic block creation using a BlockListProducer.

Parameters

parentId

The unique identifier of the parent page or block

blocks

Block producer function to generate the blocks to append

See also

Throws

NotionApiException

if the parent object doesn't exist, the blocks are invalid, or the API request fails