Questions tagged [notion-api]

Questions related to the Notion API. The API is REST-based and the officially supported SDK is written in TypeScript.

The Notion API is a JSON-based REST API for working with the Notion application.

It allows you to work with and manipulate data in Databases, Pages, and Properties in your Notion workspace(s).

You can find documentation for the API on Notion's Developer Portal.

The official client is written in TypeScript.

299 questions
4
votes
1 answer

Cannot update status on page property using notion api

I am trying to update the status of a page using the api. I am using the JS-sdk built by notion. To update the status you have to update the properties-object. I cannot get it to work as expected, it always throws an error. I have tried to use the…
vikiorf
  • 41
  • 2
  • 5
4
votes
3 answers

Facing Notion API problem while trying updating databases properties: can't update checkbox

with Notion API and node.js, I'm trying to update database properties, especially the checkbox property, for my routine ToDo tasks checker. But I couldn't find the correct way to do so. Error messages say my setting of the checkbox property isn't…
tori_san
  • 41
  • 3
4
votes
1 answer

Validation error while updating pages in notion by using the notion javascript SDK

Here's the error: Client warn: request fail { code: 'validation_error', message: 'body failed validation. Fix one: body.properties.body.id should be defined, instead was undefined. body.properties.body.name should be defined, instead was undefined.…
murtuzaali_surti
  • 121
  • 1
  • 10
4
votes
3 answers

Creating a child database in a new page in Notion API

I'm able to create a new page using the Notion API, and as part of that page I want to create & include a database table. I'm able to create the page successfully, but when trying to create the database using the child_database block, I am getting a…
Josh
  • 51
  • 4
4
votes
1 answer

How do I delete a notion page in a database?

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…
4
votes
1 answer

How to create a top-level page with Notion API?

How do you create a page at the top level (workspace). I know there is "type" of "workspace", but that only seems evident when retrieving such a page. The page-adding endpoint requires a parent ID. So how can I create a page at workspace level?
Robert Andrews
  • 1,209
  • 4
  • 23
  • 47
3
votes
0 answers

Is there a way for permissions to be set through the Notion API?

When creating database entries into a Notion database, I'd like to set permissions automatically based on some metric decided by my code logic. My particular situation is as follows: We have a bunch of issues that are associated with different…
emiflake
  • 41
  • 2
3
votes
2 answers

notion api missing property value

This is a problem that occurred during the process of retrieving the value of the database by using notion API. The communication is successful, so the json data is being parsed, but there is a problem that the value of the property entered in the…
3
votes
0 answers

Add user to Notion by an API request?

Does Notion has an API method to add access to a new user? I'm building a content service. Users pay for it in Telegram with a subscription feature. Now those, who bought subscription get access to content in Notion. So, basically I'm looking for a…
3
votes
3 answers

Search request always return an empty results

I'm trying to search into my workspace to find a page with the mention "Nora" inside the title. Here is the Python code I'm working with: data = { 'query': 'Nora', 'page_size': 10 } r = requests.post('https://api.notion.com/v1/search',…
Havarem
  • 85
  • 1
  • 6
3
votes
2 answers

Append child block at the specific place of parent block using Notion API

I have parent page where multiple child pages are coming like this: child page 3 child page 2 child page 1 Now I want to add child page 4 at the beginning. Currently I could only add to the end of the page using this endpoint but this is not what…
Bahriddin Abdiev
  • 328
  • 1
  • 14
3
votes
1 answer

Create a page from a template using the Notion API

Is it possible to create a page in a database from scratch using an existing template through the Notion API? I could not find any mention of it in the API docs.
andy
  • 253
  • 1
  • 3
  • 10
3
votes
2 answers

How to get the block Id in Notion API?

When I am trying to append children block, the block id is required. I tried to find in documentation but didn't get it. How can I get that block id?
kevin liu
  • 33
  • 1
  • 3
3
votes
2 answers

Is there is an OpenAPI specification for the Notion API?

The Notion API reference is obviously generated from an OpenAPI spec. However I can't find anywhere to download the YAML or JSON source doc (which would be useful). Has anyone found it?
Alec the Geek
  • 1,970
  • 14
  • 14
2
votes
0 answers

Retrieve list of pages by ID list in Notion API

I'm developing a project using Notion API and I need to get a list of pages given the relative id list. I basically have a list of ids saved locally and I want to get the list of relative pages. I already tried to use the Query a database endpoint…
1
2
3
19 20