> 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/api-docs-1/sections/update-section.md).

# Update Section

{% hint style="info" %}
How to update a section.
{% endhint %}

All the rules discussed on the Create Section part must be used also with this API.

{% hint style="info" %}
You don't need to update all elements of a section in this call.

&#x20;If you wish, you can only update some of them, all parameters are optional.
{% endhint %}

{% hint style="warning" %}
Note that media file elements will be added to preexisting media. If you wish to replace a media element you should **first delete it**, **then do a section update**.
{% endhint %}

{% tabs %}
{% tab title="Request" %}
`POST https://mburger.cloud/api/sections/<id>/update`

```bash
curl https://mburger.cloud/api/sections/<id>/update
-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 '<data>' 
```

#### &#x20;URL Parameters

| Name | Type        | Required | Description                                  |
| ---- | ----------- | -------- | -------------------------------------------- |
| id   | int, string | Yes      | Section id or the value of the slug element. |

{% hint style="info" %}
If you are using the slug (and the project has Multi-language enabled) make sure to include it in the request the correct locale.
{% endhint %}

#### &#x20;Parameters

The parameters to update a section will depend on which elements the section is made of and how many locales are present.

| Name         | Type | Required | Description         |
| ------------ | ---- | -------- | ------------------- |
| order        | int  | No       | To specify an order |
| {% endtab %} |      |          |                     |

{% tab title="Response" %}
When successful, a HTTP 200 and JSON like this is returned:

```bash
{
  "status_code": 0
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mburger.cloud/api-docs-1/sections/update-section.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
