Users can now add Equation Blocks, Embed, Bookmark, and Media Blocks

We have added support for retrieving, adding and updating Equation Blocks. We have also added support for updating Embed, Bookmark and Media (including image, video, audio, file, pdf) block types.

Equation Blocks

You can now can add, retrieve, and update equation blocks when using the Append block children , Retrieve block children and Update block API endpoints.

Below is an example response from Append block children containing an equation block uploaded to Notion.

{
    "object": "list",
    "results": [
        {
            "object": "block",
            "id": "2d97bf53-7e79-4efd-a6b2-53c0026ed1b5",
            "created_time": "2021-10-11T17:56:00.000Z",
            "last_edited_time": "2021-10-11T17:56:00.000Z",
            "has_children": false,
            "archived": false,
            "type": "equation",
            "equation": {
                "expression": "e = mc^2"
            }
        }
    ],
    "next_cursor": null,
    "has_more": false
}

Media Blocks (video, audio, image, file, pdf)

You can now can update media blocks when using Update block.

📘

Only media blocks of type external are supported

Updated Media blocks must be of type "external" and must reference an external URL. File upload is not currently supported.

Below is an example response from Update block containing a video block uploaded to Notion.

{
    "object": "block",
    "id": "37af9d6e-290a-488b-9d53-fb4b983f8289",
    "created_time": "2021-10-12T23:11:00.000Z",
    "last_edited_time": "2021-10-12T23:12:00.000Z",
    "has_children": false,
    "archived": false,
    "type": "video",
    "video": {
        "caption": [
            {
                "type": "text",
                "text": {
                    "content": "My caption",
                    "link": null
                },
                "annotations": {
                    "bold": false,
                    "italic": false,
                    "strikethrough": false,
                    "underline": false,
                    "code": false,
                    "color": "default"
                },
                "plain_text": "My caption",
                "href": null
            }
        ],
        "type": "external",
        "external": {
            "url": "https://www.youtube.com/watch?v=aA7si7AmPkY"
        }
    }
}

Embed and Bookmark Block Types

You can now can update embed and bookmark blocks when using Update block.

Below is an example response from Update block containing a bookmark block uploaded to Notion.

{
    "object": "block",
    "id": "050010f8-d164-4f5d-85a0-fc9db4598107",
    "created_time": "2021-10-12T23:05:00.000Z",
    "last_edited_time": "2021-10-12T23:06:00.000Z",
    "has_children": false,
    "archived": false,
    "type": "bookmark",
    "bookmark": {
        "caption": [
            {
                "type": "text",
                "text": {
                    "content": "My caption",
                    "link": null
                },
                "annotations": {
                    "bold": false,
                    "italic": false,
                    "strikethrough": false,
                    "underline": false,
                    "code": false,
                    "color": "default"
                },
                "plain_text": "My caption",
                "href": null
            }
        ],
        "url": "http://www.notion.so"
    }
}