Handle all pages properties operations in the Notion API
Note: Access this endpoint through the client instance, e.g., notion$pages$properties. Not to be instantiated directly.
Methods
Method new()
Initialise pages properties endpoint.
Not to be called directly, e.g., use notion$pages$properties instead.
Usage
PagesPropertiesEndpoint$new(client)Method retrieve()
Retrieve a page property item
Usage
PagesPropertiesEndpoint$retrieve(
page_id,
property_id,
page_size = 100,
start_cursor = NULL
)Arguments
page_idCharacter (required). The ID for a Notion page.
property_idCharacter (required). The ID of the property to retrieve.
page_sizeInteger. Number of items to return per page (1-100). Defaults to 100.
start_cursorCharacter. For pagination. If provided, returns results starting from this cursor. If NULL, returns the first page of results.
Method update()
Update a page property
Usage
PagesPropertiesEndpoint$update(
page_id,
properties = NULL,
in_trash = NULL,
icon = NULL,
cover = NULL
)Arguments
page_idCharacter (required). The ID for a Notion page.
propertiesNamed list (JSON object). Page properties to update as key-value pairs.
in_trashBoolean. Set to TRUE to move the block to trash (delete). Set to FALSE to restore the block Defaults to FALSE.
iconNamed list (JSON object). An icon for the page.
coverNamed list (JSON object). A cover image for the page.
Examples
notion <- notion_client()
# ----- retrieve a page property
notion$pages$properties$retrieve(
"23933ea0-c1e4-8104-897b-f5a09269e561",
property_id = "q;L^"
)
#> {
#> "object": "property_item",
#> "type": "checkbox",
#> "id": "q%3BL%5E",
#> "checkbox": true,
#> "request_id": "7905abd5-ea30-4e4b-95c3-f2a49113b047"
#> }
# ----- update a page property
notion$pages$properties$update(
"23933ea0-c1e4-8104-897b-f5a09269e561",
list(
`In stock` = list(
checkbox = TRUE
)
)
)
#> {
#> "object": "page",
#> "id": "23933ea0-c1e4-8104-897b-f5a09269e561",
#> "created_time": "2025-07-23T05:01:00.000Z",
#> "last_edited_time": "2025-07-23T05:01:00.000Z",
#> "created_by": {
#> "object": "user",
#> "id": "6b786605-e456-4237-9c61-5efaff23c081"
#> },
#> "last_edited_by": {
#> "object": "user",
#> "id": "6b786605-e456-4237-9c61-5efaff23c081"
#> },
#> "cover": {},
#> "icon": {},
#> "parent": {
#> "type": "database_id",
#> "database_id": "23933ea0-c1e4-8136-b37b-fa235c6f2a71"
#> },
#> "archived": false,
#> "in_trash": false,
#> "properties": {
#> "In stock": {
#> "id": "q%3BL%5E",
#> "type": "checkbox",
#> "checkbox": true
#> },
#> "Name": {
#> "id": "title",
#> "type": "title",
#> "title": [
#> {
#> "type": "text",
#> "text": {
#> "content": "Tuscan Kale",
#> "link": {}
#> },
#> "annotations": {
#> "bold": false,
#> "italic": false,
#> "strikethrough": false,
#> "underline": false,
#> "code": false,
#> "color": "default"
#> },
#> "plain_text": "Tuscan Kale",
#> "href": {}
#> }
#> ]
#> }
#> },
#> "url": "https://www.notion.so/Tuscan-Kale-23933ea0c1e48104897bf5a09269e561",
#> "public_url": {},
#> "request_id": "2392c4f7-29f1-4947-938d-0fe7ba006966"
#> }
