Method Signature
Parameters
string
required
The ID of the block to update
string
The type of block (e.g.,
"paragraph", "heading_1", "code", etc.). Must match the type-specific content being updated.boolean
Set to
true to archive the block, or false to unarchive itboolean
Set to
true to move the block to trash, or false to restore itstring
Optional authentication token to override the client-level auth
Type-Specific Parameters
Depending on the block type, you can update type-specific properties:object
For paragraph blocks:
rich_text- Array of rich text objectscolor- Text color (e.g.,"blue","red_background")
object
For heading 1 blocks:
rich_text- Array of rich text objectscolor- Text coloris_toggleable- Whether the heading can be toggled
object
For heading 2 blocks (same as heading_1)
object
For heading 3 blocks (same as heading_1)
object
For code blocks:
rich_text- Array of rich text objects containing the codelanguage- Programming language (e.g.,"javascript","python")caption- Array of rich text objects for the caption
object
For to-do blocks:
rich_text- Array of rich text objectschecked- Boolean indicating if the item is checkedcolor- Text color
object
For callout blocks:
rich_text- Array of rich text objectsicon- Icon object (emoji or file)color- Background color
Response
Returns the updatedBlockObjectResponse or PartialBlockObjectResponse.
string
Always
"block"string
The block ID
string
The block type
string
Updated timestamp reflecting the modification
PartialUserObjectResponse
User who made the update
boolean
Current archived status
boolean
Current trash status