
## Delete section

`DELETE /v1/catalog-sections/:id`

Deletes a catalog section by identifier. A deleted section cannot be restored via the API — create a new one if needed.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Section identifier |

## Examples

### curl — personal key

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-sections/215" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/catalog-sections/215" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-sections/215', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

if (res.status === 204) {
  console.log('Section deleted')
}
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/catalog-sections/215', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

if (res.status === 204) {
  console.log('Section deleted')
}
```

## Response

On successful deletion the API returns HTTP status `204 No Content` with an empty body — success is checked by the status.

## Response example

```http
HTTP/1.1 204 No Content
```

## Error response example

422 — the section cannot be deleted or does not exist:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Access Denied"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 422 | `BITRIX_ERROR` | No section with the given `id`, or Bitrix24 refused the deletion — response `Access Denied` |
| 403 | `SCOPE_DENIED` | The key lacks the `catalog` scope |
| 401 | `MISSING_API_KEY` | `X-Api-Key` was not provided |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Create section](/docs/entities/catalog-sections/create)
- [List sections](/docs/entities/catalog-sections/list)
- [Get section](/docs/entities/catalog-sections/get)
- [Update section](/docs/entities/catalog-sections/update)
- [Catalogs](/docs/entities/catalogs)
- [Batch](/docs/batch)
- [Limits and optimization](/docs/optimization)
