Confluence REST API Creates all Pages as Narrow

I am using the Confluence REST API to create pages. I am using python to do this and an xml format. The endpoint used is “wiki/api/v2/pages” with a payload of

params = json.dumps({“id”: page_id, “spaceId”: space_id, ‘status’: ‘current’, “parentId”: parent_id, “title”: title, “body”: {“representation”: “storage”, “value”: page_xml}}).

This works exactly as I would want it to, but the page is not the full width. The page created is in a narrow format. However, if I click edit and then publish immediately after, the page is full screen. Would love to find out how to just immediately have this formatted as a full screen document.

You need to set the following page properties:

You can do this using two Create page property calls.

1 Like