3

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 I want.

Is there a way to implement it? More generally, can I add child page 2.5 between 2 and 3?

Bahriddin Abdiev
  • 328
  • 1
  • 14

2 Answers2

1

You can delete children's from page, modify list in code and create once again. With Python api I did something like this to add cover at the beginning:

list = client.blocks.children.list(page_id)
for block in list['results']:
    client.blocks.delete(block['id'])
    children = []
    children.append({'image': {'external': {'url': 'cover_url'}}})
    children.extend(list['results'])
    client.blocks.children.append(block_id=page_id, children=children)
marnow955
  • 11
  • 2
0

I asked the same question on Notion's Slack and looks like it is not possible with current API. Feel free to update in future if it changes.

Bahriddin Abdiev
  • 328
  • 1
  • 14