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 = "29c82aa7-fc4e-8184-8582-da9da081508e";

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);
    # JSON data can also be passed as a path to a .json file

oint notion EditDatabaseProperties \
--token "***" \
--base "29c82aa7-fc4e-81dd-91f2-f1e5911332dd" \
--props "{'Email':'rich_text','Website':null}" \
--title "TestTitle" \
--description "TestDescription"
Result
{
"object": "database",
"id": "29d82aa7-fc4e-8173-83c3-eef87a456cc4",
"cover": null,
"icon": null,
"created_time": "2025-10-31T11:46: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-10-31T11:46: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": {
"Number": {
"id": "BlJD",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"Phone": {
"id": "Wl~i",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Active": {
"id": "Z%5B%3Dr",
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"User": {
"id": "%5EIRs",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
"CreationDate": {
"id": "%60%7BzS",
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
"Image": {
"id": "g%5EIp",
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
"Email": {
"id": "nJ%40%3F",
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Description": {
"id": "oeUs",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Status": {
"id": "~d%3Cz",
"name": "Status",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "baddcdaa-38ec-4a30-bb0a-3ad825ed31c3",
"name": "New",
"color": "green",
"description": null
},
{
"id": "09d5c3f9-052d-4bc6-a68e-3468343a019e",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "df89a664-1720-411e-b20c-f2479b064e33",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"Name": {
"id": "title",
"name": "Name",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...