> ## 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.

# Delete Section

> Remove a section from a template

Removes a section (and its blocks) from a template. The section file stays
in the theme. Requires the `write_themes` scope.

## Request

```bash theme={null}
curl -X DELETE "https://api.launchmystore.io/api/v1/themes/1f2e3d4c-5b6a-7980-a1b2-c3d4e5f60718/sections/rich-text.json?template=index" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

## Path Parameters

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

The theme id.

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

The section's id in the template.

## Query 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
`templateName` or `templatePath`.

## Response

```json theme={null}
{
  "status": 200,
  "state": "success",
  "message": "Section deleted successfully"
}
```

## Error Codes

| Status | Description |
| - | - |
| `404` | Theme, template or section not found |
| `422` | `template` 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.