For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set the visibility of a section

curl https://mburger.cloud/api/blocks/<id>/sections
-X POST 
-H "Accept: application/json" 
-H "Content-Type: application/x-www-form-urlencoded"
-H "X-MBurger-Token: <token>" 
-H "X-MBurger-Version: 3"
-d 'elements[<locale>][<element_type>]=<value>'
-d 'visibility'
var visibilitySettings = MBAdminVisibilitySettings.draft()
visibilitySettings = MBAdminVisibilitySettings.visible()
// This visibility set the section to be available after 100 seconds
visibilitySettings = MBAdminVisibilitySettings.scheduled(availableAt: Date().addingTimeInterval(100))
MBAdmin.addSectionToBlock(withBlockId: BLOCK_ID,
                          elements: elements,                                  
                          visibilitySettings: visibilitySettings,
                          success: { sectionId in
                                    
                          },
                          failure: { error in
                                    
                          })

Visibility can be set as visible, draft or scheduled. If visibility is set on scheduled, you need to specify

available_at

Last updated