Created by and last edited by properties in Block, Page and Database objects
over 2 years ago by Alp Artar
We have added created_by
and last_edited_by
properties for block, page and database objects corresponding to the users who have created or last edited these objects. Both properties are user objects which will containΒ object
Β andΒ id
keys. This is a backwards compatible change that is available in older versions of the API as well.
{
"object": "page",
"id": "e722caec-ae02-4a41-9bbd-286f65f8dca4",
"created_time": "2022-02-15T21:24:00.000Z",
"last_edited_time": "2022-02-17T22:40:00.000Z",
"created_by": {
"object": "user",
"id": "71e95936-2737-4e11-b03d-f174f6f13087"
},
"last_edited_by": {
"object": "user",
"id": "5ba97cc9-e5e0-4363-b33a-1d80a635577f"
},
"cover": null,
"icon": null,
"parent": {
"type": "page_id",
"page_id": "a7e32210-c151-4b96-8b94-ea659b1e8e4f"
},
"archived": false,
"properties": {
"title": {
"id": "title",
"type": "title",
"title": [
{
"type": "text",
"text": {
"content": "Tasks",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Tasks",
"href": null
}
]
}
},
"url": "https://notion.so/Tasks-e722caecae024a419bbd286f65f8dca4"
}
{
"object": "block",
"id": "9bc30ad4-9373-46a5-84ab-0a7845ee52e6",
"created_time": "2021-03-16T16:31:00.000Z",
"created_by": {
"object": "user",
"id": "cb38e95d-00cf-4e7e-adce-974f4a44a547"
},
"last_edited_time": "2021-03-16T16:32:00.000Z",
"last_edited_by": {
"object": "user",
"id": "e79a0b74-3aba-4149-9f74-0bb5791a6ee6"
},
"has_children": false,
"type": "to_do",
"archived": false,
"to_do": {
"rich_text": [
{
"type": "text",
"text": {
"content": "Lacinato kale",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Lacinato kale",
"href": null
}
],
"checked": false
}
}
{
"object": "database",
"id": "e8d49c2d-9644-4ba2-8511-918a62309665",
"cover": null,
"icon": null,
"created_time": "2022-02-15T21:09:00.000Z",
"created_by": {
"object": "user",
"id": "71e95936-2737-4e11-b03d-f174f6f13087"
},
"last_edited_by": {
"object": "user",
"id": "5ba97cc9-e5e0-4363-b33a-1d80a635577f"
},
"last_edited_time": "2022-02-17T18:43:00.000Z",
"title": [
{
"type": "text",
"text": {
"content": "Tasks",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "Tasks",
"href": null
}
],
"properties": {
"Tags": {
"id": "keGJ",
"name": "Tags",
"type": "multi_select",
"multi_select": {
"options": []
}
},
"Name": {
"id": "title",
"name": "Name",
"type": "title",
"title": {}
}
},
"parent": {
"type": "page_id",
"page_id": "e722caec-ae02-4a41-9bbd-286f65f8dca4"
},
"url": "https://notion.so/e8d49c2d96444ba28511918a62309665",
"archived": false
}
We have also added a boolean archived
property for database objects to denote if the database has been deleted. You can use the archived
property to archive or unarchive a database and its descendants when updating the database.