> For the complete documentation index, see [llms.txt](https://docs.mburger.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mburger.cloud/how-to/advanced-section-creation/send-or-schedule-a-push-when-creating-a-section.md).

# Send or schedule a push when creating a section

{% tabs %}
{% tab title="cURL" %}

```bash
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 'want_push'
```

{% endtab %}

{% tab title="iOS SDK" %}

```swift
MBAdmin.addSectionToBlock(withBlockId: BLOCK_ID,
                          elements: elements,                                  
                          pushSettings: MBAdminPushSettings(wantsPush: true,
                                                            pushBody: "BODY_OF_THE_PUSH"),
                          success: { sectionId in
                                    
                          },
                          failure: { error in
                                    
                          })
```

{% endtab %}

{% tab title="Android SDK" %}

```kotlin
val params = ArrayList<MBAdminGenericParameter>()
//Add it only if you want to send a push, body can be null
params.add(MBAdminPushSettingsParameter(push_body = BODY_OF_THE_PUSH))

val addSectionListener = object: MBAdminAddSectionListener{
            override fun onSectionAdded(section_id: Long) {
            }

            override fun onSectionAddedError(error: String) {
            }
        }

MBurgerAdminTasks.addSection(
                    context = applicationContext, 
                    block_id = BLOCK_ID, 
                    listener = addSectionListener, 
                    params = params,
                    locale = Locale.getDefault().getLanguage());
```

{% endtab %}

{% tab title="PHP SDK" %}

```
// Work in progress
```

{% endtab %}

{% tab title="JS SDK" %}

```
// POST actions are not available atm on our JS SDK.
// If it could be interesting for you, please submit 
// a feature request here:
// https://support.mburger.cloud/hc/en-us/community/topics/360000550497-Feature-Request?
```

{% endtab %}

{% tab title="Flutter SDK" %}

```dart
await MBAdmin.shared.addSectionToBlock(
  BLOCK_ID,
  elements,
  pushSettings: MBAdminPushSettings(
    wantsPush: true,
    pushBody: 'BODY_OF_THE_PUSH',
  ),
);
```

{% endtab %}
{% endtabs %}
