UPDATE: Block references are not supported in API version 2022-06-28
I’m working on a Python integration to process existing Notion pages. Everything works fine except when I try to retrieve content that includes block references (when you copy a block link and paste it as a mention).
The integration has access to all the pages I need, but block mentions just show up as empty content in the API response. Page mentions and user mentions work perfectly though.
I’m making requests to the blocks endpoint like this:
api_headers = {
"Authorization": f"Bearer {API_TOKEN}",
"Content-Type": "application/json",
"Notion-Version": "2022-06-28",
}
response = requests.get(f"https://api.notion.com/v1/blocks/{target_block_id}", headers=api_headers)
When I fetch a normal block, I get the expected structure:
{
"archived": False,
"bulleted_list_item": {
"color": "default",
"rich_text": [
{
"annotations": {
"bold": False,
"code": False,
"color": "default",
"italic": False,
"strikethrough": False,
"underline": False,
},
"href": None,
"plain_text": "Here is some example content that I want to reference",
"text": {
"content": "Here is some example content that I want to reference",
"link": None,
},
"type": "text",
}
],
},
"has_children": False,
"object": "block",
"type": "bulleted_list_item",
}
But when I try to get a block that contains a block mention, the mention part is missing:
{
"archived": False,
"bulleted_list_item": {
"color": "default",
"rich_text": [
{
"annotations": {
"bold": False,
"code": False,
"color": "default",
"italic": False,
"strikethrough": False,
"underline": False,
},
"href": None,
"plain_text": " ",
"text": {"content": " ", "link": None},
"type": "text",
}
],
},
"has_children": False,
"object": "block",
"type": "bulleted_list_item",
}
Is there a way to access block mentions through the API or is this feature not available yet?