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 = "2e082aa7-fc4e-817f-8574-d9a252b37d57";

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 "2e082aa7-fc4e-81b7-8f70-d5f822a1f1b0" \
--props "{'Email':'rich_text','Website':null}" \
--title "TestTitle" \
--description "TestDescription"
Result
{
"object": "database",
"id": "2e082aa7-fc4e-811d-b022-c46043f7ecfa",
"cover": null,
"icon": null,
"created_time": "2026-01-06T14:14: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": "2026-01-06T14:14: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": "%3DIj%3F",
"name": "Number",
"description": null,
"type": "number",
"number": {
"format": "number"
}
},
"Description": {
"id": "%40i%3DR",
"name": "Description",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Phone": {
"id": "E%5DNw",
"name": "Phone",
"description": null,
"type": "phone_number",
"phone_number": {}
},
"Status": {
"id": "FMoh",
"name": "Status",
"description": null,
"type": "select",
"select": {
"options": [
{
"id": "8a4b632a-ded8-49b3-84ee-81a9e3e1d094",
"name": "New",
"color": "green",
"description": null
},
{
"id": "30f43bbf-aa18-432a-8b08-baee29b8efb6",
"name": "InProgress",
"color": "yellow",
"description": null
},
{
"id": "8b0899f4-2654-4bc7-a406-242345d3d897",
"name": "Remote",
"color": "red",
"description": null
}
]
}
},
"Active": {
"id": "Lu%5BU",
"name": "Active",
"description": null,
"type": "checkbox",
"checkbox": {}
},
"Email": {
"id": "h%3AlE",
"name": "Email",
"description": null,
"type": "rich_text",
"rich_text": {}
},
"Image": {
"id": "hstm",
"name": "Image",
"description": null,
"type": "files",
"files": {}
},
"User": {
"id": "sZy%5B",
"name": "User",
"description": null,
"type": "people",
"people": {}
},
"CreationDate": {
"id": "vLP%5B",
"name": "CreationDate",
"description": null,
"type": "date",
"date": {}
},
"Name": {
"id": "title",
"name": "Name",
"description": null,
"type": "title",
"title": {}
}
},
"parent": {
...