## Move site to trash

`POST /v1/sites/:id/trash`

Recycle bin hides the site from GET /v1/sites. This is different from physical DELETE /v1/sites/:id.

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | yes | Positive safe integer site ID |
| scope | string | no | KNOWLEDGE / GROUP / MAINPAGE; omit for ordinary sites |

Requires landing key scope. A knowledge-base or group site can be invisible without scope. POST body is empty; mark is not accepted.

## curl

```bash
curl -X POST "https://vibecode.bitrix24.com/v1/sites/42/trash" -H "X-Api-Key: YOUR_API_KEY"
```

## JavaScript

```javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/sites/42/trash", {
  method: "POST",
  headers: { "X-Api-Key": "YOUR_API_KEY" },
});
const data = await response.json();
```

## Response

```json
{
  "success": true,
  "data": {
    "id": 42,
    "active": false,
    "deleted": true,
    "type": "PAGE"
  }
}
```

## Errors

400 INVALID_PARAMS / INVALID_SCOPE; 401 TOKEN_MISSING; 403 SCOPE_DENIED / BITRIX_ACCESS_DENIED; 404 ENTITY_NOT_FOUND; 409 LANDING_MODULE_NOT_ENABLED; 422 BITRIX_ERROR; 429 rate limits; 502 / 503 upstream or transport refusal. Write operations with a READONLY key return 403 WRITE_BLOCKED_READONLY_KEY.

Bitrix24: `landing.site.markDelete`.

[Sites](/docs/entities/sites)
