Make layout full-width when creating page

I’m creating pages using a macro and would like to set the layout to full-width. By default it is set to fixed width and a user has to enter page edit mode and click the button ‘make page full-width’. ↔︎
Is there a way to control the layout when creating a page using the API?
See also
CONFCLOUD-65654 - how do I set the full-width view when creating a page via the Confluence Cloud REST API?


I’m pretty sure the answer is a simple no. Very happy to be proven wrong though :see_no_evil:

1 Like

Try to remove “editor” content property

This is possibly the missing piece:

For those wondering if full-width is possible through the API, it seems that it is possible through the properties endpoints (here) and when you create new content (here) though the documentation for the create content endpoint does not say so. I found this post which suggests that it is possible through the create content endpoint (here). I made this work in my side project and will put an example of the body I sent below (python code) in case anyone makes it here and is looking. The “content-appearance-draft” and “content-appearance-published” are the properties that need to be set for the page width to appear full.

body = { 'space': { 'key': confluence_space_key }, 'ancestors': [ { 'id': confluence_ancestor_page_id } ], 'type': 'page', 'title': confluence_page_name, 'metadata': { 'properties': { 'content-appearance-draft': { 'value': 'full-width' }, 'content-appearance-published': { 'value': 'full-width' } } } }```

I’ve been looking for that for quite some time now, thank you so much :heart:

1 Like