---
title: "Delete a community channel"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a community channel

Path: Nicer API › Community

`POST /community/channels/{channelId}/archive`

URL: `https://api.nicer.travel/community/channels/{channelId}/archive`

Deletes one of the agency's channels for good, with its messages and its member list: nothing is archived, whatever the path says. Publishes app.CommunityChannel.archived and answers archived true. Only the agency's admins may call it. Errors: 400 ERROR_UNAUTHORIZED for a caller who is not an admin or a channel of another agency; 400 ERROR_COMPANY_REQUIRED and 403 ERROR_DO_NOT_HAVE_PERMISSION as on every community route.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `channelId` (`community.channels.archive.path.channelId`; string, required)

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.community.channels.archive({
  "channelId": "string"
});
```

### Nicer CLI

```bash
nicer community channels archive --channel-id 'string'
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/community/channels/<channelId>/archive' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/community/channels/<channelId>/archive';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/community/channels/<channelId>/archive"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "channelId": "string",
  "archived": true
}
```

- `channelId` (`community.channels.archive.response.200.channelId`; string, required) — The channel that was deleted.
- `archived` (`community.channels.archive.response.200.archived`; boolean, required)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.archive.response.400.errorCode`; string, required)
- `errorMessage` (`community.channels.archive.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.archive.response.401.errorCode`; string, required)
- `errorMessage` (`community.channels.archive.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`community.channels.archive.response.403.errorCode`; string, required)
- `errorMessage` (`community.channels.archive.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Community/community.channels.archive/index.md
