Creating workspace-level pages using Notion API - parent ID issue

I’m trying to figure out how to add a new page directly to the workspace root using the Notion API. When I look at existing top-level pages through the API, I can see they have a “type” of “workspace”, which makes sense. But here’s my problem - the create page endpoint always asks for a parent ID.

I’ve been stuck on this for a while now. The API documentation shows examples of creating pages inside databases or as child pages, but I can’t find any clear guidance on creating pages at the workspace level. What should I use as the parent ID when I want to create a page that sits at the top level of my workspace? Is there a specific workspace ID I should reference, or is there a different approach altogether?

I ran into the same thing building a Notion integration. Those workspace-level pages you can see through the API are just legacy pages from before they added restrictions. You can’t create new pages at the workspace root anymore via API calls. My workaround was creating a parent page manually in Notion - I called mine “API Pages” - then using that page’s ID for all my API-created pages. Just hit the search endpoint with an empty query to get the ID of any page your integration can access. It’s an extra step, but it works well for keeping your API content organized.

Unfortunately, the Notion API does not permit the creation of pages directly at the workspace root level. This has been a persistent limitation. The top-level pages visible in the workspace were created through the Notion interface rather than via the API. A practical workaround is to first create a parent page manually within Notion. This parent page can then serve as a container for your API-created pages by utilizing its ID as the parent ID. While this adds an extra layer of hierarchy, it is a reliable approach. You can retrieve the parent page’s ID using the search endpoint before creating new pages.

yeah, i feel ur pain with this issue too. Notion made the workspace top-level pages off-limits for the API, so its a bummer. My fix was making a parent page in Notion first, then using its ID for any new pages added via API. not perfect, but it gets the job done.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.