
## Delete a page

`DELETE /v1/pages/:id`

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

## Parameters

| Parameter | Type | Req. | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Page identifier |

## Examples

### curl — personal key

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

### curl — OAuth application

```bash
curl -X DELETE "https://vibecode.bitrix24.com/v1/pages/2295" \
  -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/pages/2295', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

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

### JavaScript — OAuth application

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

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

## Response

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

## Response example

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

## Error response example

404 — the page is not found or already deleted:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Landing not found."
  }
}
```

## Errors

| HTTP | `error.code` | Description |
|------|--------------|---------|
| 404 | `ENTITY_NOT_FOUND` | A page with this ID is not found or already deleted |
| 403 | `BITRIX_ACCESS_DENIED` | The user does not have permission to delete this page |
| 403 | `SCOPE_DENIED` | The API key does not have the `landing` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

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

## Known specifics

**Deletion frees up the page code.** After deletion the symbolic code is free again — a new page with the same `code` on the same site can be created immediately.

## See also

- [List pages](/docs/entities/pages/list) — find the ID of the page before deletion, including via `?filter[siteId]=:id`
- [Get a page](/docs/entities/pages/get) — check the page before deletion
- [Delete a site](/docs/entities/sites/delete) — deleting a site after clearing its pages
- [Batch](/docs/batch) — bulk deletion of one site's pages
- [Limits and optimization](/docs/optimization) — rate limits
