A quick peek at the docs leads me to think that your request is incorrect. In the request example, the parent item is shown as a string, not an object. To see this and other helpful info, click on the “Examples” dropdown on the right (next to “Request”), then choose “Request Example”. It will show an example request, including required types.
Agree. To me, the properties look odd considering Notion’s requirements. On the left is Notion’s docs; yours seems a bit dissimilar with the type element.
Originally was trying to create a page. I solved my problem by using a database instead. However, I did go back to see if I could create a page using the suggestions above but still no luck.
My gut feeling on this is that the parent type should be “page” or “database”, not “page_id” or “database_id”; i.e. the parent page/database obviously has an ID property, but the ID itself isn’t the literal parent, so it’s even more confusing why your most recent example actually worked with “database_id” as the parent type.
Notion’s lack of clear examples for situations like this is more than a little frustrating. I recall encountering similar documentation issues when I last worked with their API (I was only reading from it, not writing to it). It also feels at times like they made their data structure a little too granular. I kinda-sorta get why they did it, but that didn’t make using it any easier.
I don’t have a lot of experience with code or scripting and am only self taught so I don’t have much to offer in the form of a solution. But I spent a lot of time really trying to understand the documentation and breaking it down into the most basic way to see where the issue was coming from but still no solution in creating a ‘page’. Only had success with a database.
Thanks for the update. I guess I’ve just got my own issues with Notion’s wording.
As for the issue you encountered, there might be some deeper reason why a database ID worked where a page ID didn’t. Without knowing a lot more about your specific setup, though, it’s tough to say why.