A page created via API is not displayed correctly, with error “This editor does not support displaying this content”

A page created on Confluence cloud via official API is not displayed with error “This editor does not support displaying this content”.

With mouse on “?” icon, additional error is shown, “Content is not available in this editor, this will be preserved when you edit and save”

What are the possible causes?
Or how can I find out what is wrong?


Actually this is quite similar to A page created via API is not displayed with error “This editor does not support displaying this content” - Confluence Development / Confluence Cloud - The Atlassian Developer Community.

I was advised to try via official API, and result was the same.
Please help.

Thank you in advance.

When creating a page via Rest call, have you tried to set the editor to v2?
Like this as the data to send via Post request:

'{
	"title": "' + pageTitle + '",
	"type": "page",
	"space": {
		"key": "' + spaceKey + '"
	},
	"body": {
		"storage": {
			"value": "' + bodyContent + '",
			"representation": "storage"
		},
		"metadata": {
			"properties": {
				"editor": {
					"value": "v2"
				}
			}
		}
	}
}'

Hi, thanks for replying @hauke.hoerhold ,

I tried both with and without metadata for editor v2,
and got the same result.