## Remove the app from Bitrix24

`POST /v1/infra/servers/:id/b24-catalog/hide`

Hides the app from employees in the Bitrix24 catalog and deletes the app chat together with its history. Access to the app and its links stay the same.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|----------|
| `id` (path) | string (UUID) | yes | Server ID from the [server list](./list.md). The server must be managed by the API key used for the request |

The request body may be empty or `{}`. Unknown fields are ignored.

## Examples

### curl — personal key

```bash
curl -X POST -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" -d '{}' \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/b24-catalog/hide
```

### curl — OAuth application

```bash
curl -X POST -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" -d '{}' \
  https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/b24-catalog/hide
```

### JavaScript — personal key

```javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/b24-catalog/hide`,
  {
    method: 'POST',
    headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
    body: '{}',
  }
)
const body = await res.json()
if (!body.success) throw new Error(body.error.code)
console.log(body.data.showInBitrix24, body.data.queued)
```

### JavaScript — OAuth application

```javascript
const res = await fetch(
  `https://vibecode.bitrix24.com/v1/infra/servers/${serverId}/b24-catalog/hide`,
  {
    method: 'POST',
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
      'Content-Type': 'application/json',
    },
    body: '{}',
  }
)
```

## Response fields

| Field | Type | Description |
|------|-----|----------|
| `success` | boolean | `true` when the choice is saved |
| `data.queued` | boolean | `true` if the card exists and its deletion has been queued. `false` if there is no card |
| `data.showInBitrix24` | string | The saved choice. Always `NO` |

## Response example

Card deletion has been queued:

```json
{
  "success": true,
  "data": {
    "queued": true,
    "showInBitrix24": "NO"
  }
}
```

## Error response example

404 — the server was not found or is managed by another API key:

```json
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Server not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|----------|
| 404 | `NOT_FOUND` | The server does not exist, has been deleted, or is managed by another API key |
| 404 | `NOT_FOUND` | The server was deleted before the choice was saved |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `INVALID_API_KEY` | The key is not recognized |
| 403 | `INFRA_FORBIDDEN_FOR_COWORK_KEY` | A Cowork key cannot perform write operations. Use a [project key for deploy](/docs/cowork/deploy-key) |
| 429 | `RATE_LIMITED` | Request limit exceeded. Retry after the pause specified in the `Retry-After` header |

For the full list of shared API errors, see [Errors](/docs/errors).

## Known specifics

- **The card is deleted in the background.** Check the [server state](./get.md) for completion: `b24CatalogSync.itemId` becomes `null` and `pendingOp` is no longer `DELETE`.
- **You can hide the app before its card is created.** The pending publication is canceled and the choice becomes `NO`. Subsequent deployments keep this choice and do not create a card.
- **Publishing again creates a new chat.** After deletion, [show the app again](./b24-catalog-publish.md) if employees need it. The new chat will be empty; the previous history is not restored. While deletion is pending, publishing returns `409 CATALOG_DELETE_PENDING` and the choice stays `NO`.
- **Repeating the call keeps the choice.** If the card no longer exists, the method returns `queued: false` and `showInBitrix24: "NO"`.

## See also

- [Publish the app to the Bitrix24 catalog](./b24-catalog-publish.md)
- [Get a server](./get.md)
- [Deploy an app](/docs/infra/deploy/deploy)
