> ## Documentation Index
> Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Section Settings

> Change the settings of one section in a template

Changes the settings of one section on a template. Requires the
`write_themes` scope. The values you send are merged into the section's
current settings; settings you leave out keep their values.

## Request

```bash cURL theme={null}
curl -X PUT "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/image-banner/settings.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "index",
    "settings": { "heading": "Summer Sale", "button_label": "Shop Collection" }
  }'
```

```javascript Node.js theme={null}
const response = await fetch('https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/image-banner/settings.json', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    template: 'index',
    settings: { heading: 'Summer Sale', button_label: 'Shop Collection' }
  })
});
```

## Path Parameters

**theme\_id** `string` *required*

The theme id.

**section\_id** `string` *required*

The section's id in the template (the `id` from
[Template Sections](https://docs.launchmystore.io/api-reference/themes/sections.md)).

## Body Parameters

**template** `string` *required*

The template the section is on. Templates are named as in the theme's `templates/` folder: `index`,
`product`, `product.alternate`, `customers/account` (URL-encode the `/` in a
path segment), and section groups such as `header-group`. A path such as
`templates/index.json` is accepted too. Also accepted as
`templatePath`, `templateName` or a `?template=` query parameter.

**settings** `object` *required*

Setting ids mapped to their new values.

## Response

The section's settings after the change are returned under `data.settings`.

```json theme={null}
{
  "status": 200,
  "state": "success",
  "message": null,
  "data": {
    "success": true,
    "message": "Settings saved successfully",
    "settings": {
      "heading": "Summer Sale",
      "button_label": "Shop Collection",
      "button_link": "/collections/all"
    }
  },
  "pagination": null
}
```

## Error Codes

| Status | Description |
| - | - |
| `404` | Theme, template or section not found |
| `422` | `template` or `settings` missing, or an invalid template name |
| `401` | Invalid or missing access token |
| `403` | App doesn't have the `write_themes` scope |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.