Skip to main content

Edit database properties

Edits properties of an existing database

Function EditDatabaseProperties(Val Token, Val Base, Val Properties = "", Val Title = "", Val Description = "") Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Base--baseStringTarget database ID
Properties--propsMap of KeyAndValueNew or modified database properties
Title--titleStringNew database title
Description--descriptionStringNew database description

Returns: Map Of KeyAndValue - serialized JSON response from Notion


1C:Enterprise/OneScript code example
    Token = "secret_9RsfMrRMqZwqp0Zl0B...";
Base = "26e82aa7-fc4e-81d1-af10-fbd1542ade36";

Title = "TestTitle";
Description = "TestDescription";

Properties = New Map;
Properties.Insert("Email", "rich_text"); // Type fields "Email" will changed with email to text
Properties.Insert("Website"); // Field "Website" will deleted

Result = OPI_Notion.EditDatabaseProperties(Token, Base, Properties, Title, Description);
    oint notion EditDatabaseProperties \
--token "***" \
--base "26f82aa7-fc4e-8100-8c40-ec5a1dfa460e" \
--props "{'Email':'rich_text','Website':null}" \
--title "TestTitle" \
--description "TestDescription"
Result
{
"object": "database",
"id": "26f82aa7-fc4e-8100-8c40-ec5a1dfa460e",
"cover": null,
"icon": null,
"created_time": "2025-09-15T22:34:00Z",
"created_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_by": {
"object": "user",
"id": "8b07422e-eeea-40d1-8d5e-c784211825b0"
},
"last_edited_time": "2025-09-15T22:34:00Z",
"title": [
{
"type": "text",
"text": {
"content": "TestTitle",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "TestTitle",
"href": null
}
],
"description": [
{
"type": "text",
"text": {
"content": "TestDescription",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "TestDescription",
"href": null
}
],
"is_inline": false,
"properties": {
"Email": {
"id": "%3AGLR",
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"User": {
"id": "%40lUr",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
"Description": {
"id": "OQ_%60",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Status": {
"id": "Qt%5EW",
"name": "Status",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "d6f95a10-9a0e-492a-84a9-762c1e53901d",
"name": "New",
"color": "green",
"description": null
},
{
"id": "06d8c6ba-4e47-49cf-a961-982919bdf175",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "996d1095-8156-494a-b27b-71979d9a61c5",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"Number": {
"id": "%5DJaU",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"CreationDate": {
"id": "%5EeGi",
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
"Phone": {
"id": "bX%3CC",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Image": {
"id": "h%3D%3Bs",
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
"Active": {
"id": "~Y%3Cb",
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"Name": {
"id": "title",
"name": "Name",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...