How to Update the Icon Emoji of a Notion Page Using the Notion API
In this tutorial, we will learn how to update the icon emoji value of a Notion page using the Notion API. Before we begin, make sure you have already initialized the Notion client.
1 | import { Client } from '@notionhq/client' |
Assuming that the page ID is stored in the page_id
variable, you can follow these steps to set the value of the page icon to a new emoji:
1 | await notion.pages.update({ |
This code snippet will update the icon of the specified Notion page to the emoji of a check mark (✅).
To update the icon, we use the update
method of the pages
endpoint. The update
method takes an object as its argument, where we provide the page_id
and the new icon emoji value.
That’s it! You have successfully updated the icon emoji of a Notion page using the Notion API.
Tags: Notion API, page icon, emoji, update