0

I have a request with body like this:

{
    "parent": {
        "database_id": "<id>"
    },
    "properties": {
        "Name": {
            "title": [
                {
                    "text": {
                        "content": "New note"
                    }
                }
            ]
        },
        "Param 1": {
            "rich_text": [
                {
                    "text": {
                        "content": "A dark green leafy vegetable"
                    }
                }
            ]
        },
        "Param 2": {
            "rich_text": [
                {
                    "text": {
                        "content": "A dark green leafy vegetable"
                    }
                }
            ]
        },
        "Param 3": {
            "rich_text": [
                {
                    "text": {
                        "content": "A dark green leafy vegetable"
                    }
                }
            ]
        }
    }
}

How to add content of the page in this body? enter image description here

Tried to add block "description" into body, but got responce with errors Didnt find the information in api description

1 Answers1

0

According to the official docs, you may use a body like this:

{
   "parent": { "page_id": "..." },
   "properties": {
     "title": {
       "title": [{ "type": "text", "text": { "content": "A page title" } }]
     }
   },
   "children": [
     {
       "object": "block",
       "type": "paragraph",
       "paragraph": {
         "rich_text": [{ "type": "text", "text": { "content": "You made this page using the Notion API." } }]
       }
     }
   ]
}

for a new page creation by means of the endpoint https://api.notion.com/v1/pages.

On the other hand, having the existing page, you may append child blocks with the body below:

{
  "children": [
    {
      "object": "block",
      "type": "paragraph",
      "paragraph": {
        "text": [{ "type": "text", "text": { "content": "– Notion API Team", "link": { "type": "url", "url": "https://twitter.com/NotionAPI" } } }]
      }
    }
  ]
}