How do I delete a notion page in a database?

Viewed 540

According to the API, we delete a page by switching "archived" to true. My code is as follows:

//in async
await notion.pages.update({page_id: idVar, archived: true});

but no dice. I can set parameters and whatnot, but this particular property doesn't seem to work.

Edit: Thanks guys, code worked fine after updating the API!

1 Answers

I had the same issue and I updated notion's js package. Seems like it's working properly with version 0.2.3 of @notionhq/client. When I was running version 0.2.0 it wouldn't work properly.

Related