updateDatabase

abstract suspend fun updateDatabase(id: UuidString, title: RichTextList? = null, icon: EmojiOrFile? = null, cover: File? = null, properties: PropertySpecList? = null): Database

Updates an existing database's properties. This method allows you to modify the database's title, icon, cover, and property schema.

Return

The updated Database object

Parameters

id

The unique identifier of the database to update

title

Optional new title for the database (null to keep current)

icon

Optional new emoji or file to use as the database icon

cover

Optional new file to use as the database cover

properties

Optional new property specifications to update the database schema

See also

Throws

NotionApiException

if the database doesn't exist, the properties are invalid, or the API request fails