---
title: "Update 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.

# Update a community channel

Path: Nicer API › Community

`PUT /community/channels/{channelId}`

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

Changes a channel's name or description, or, on a creator-only channel, who may post (writersToAdd and writersToRemove, by userId), and answers the channel without a memberCount. Only the channel's creator or the agency's admins may call it. Errors: 400 ERROR_UNAUTHORIZED for any other caller, for writer changes on a channel where all members post, for removing the creator from the writers, for a writer who is not an active member of the agency, or for 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.update.path.channelId`; string, required)

## Request body

_Required._

- `description` (`community.channels.update.description`; any of, optional)
  - any of the following: `string`, `null`
- `name` (`community.channels.update.name`; string, optional)
  - maxLength: `80` · minLength: `1`
- `writersToAdd` (`community.channels.update.writersToAdd`; array of string, optional)
  - minLength: `1`
- `writersToRemove` (`community.channels.update.writersToRemove`; array of string, optional)
  - minLength: `1`

## Example request

```json
{
  "description": "string",
  "name": "string",
  "writersToAdd": [
    "string"
  ],
  "writersToRemove": [
    "string"
  ]
}
```

## 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.update({
  "channelId": "string"
});
```

### Nicer CLI

```bash
nicer community channels update --channel-id 'string' --input - <<'JSON'
{}
JSON
```

### cURL

```bash
curl --request PUT \
  --url 'https://api.nicer.travel/community/channels/<channelId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "string",
  "name": "string",
  "writersToAdd": [
    "string"
  ],
  "writersToRemove": [
    "string"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/community/channels/<channelId>';
const options = {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    description: 'string',
    name: 'string',
    writersToAdd: ['string'],
    writersToRemove: ['string']
  })
};

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>"

payload = {
    "description": "string",
    "name": "string",
    "writersToAdd": ["string"],
    "writersToRemove": ["string"]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "channelId": "string",
  "companyName": "string",
  "name": "string",
  "description": "string",
  "private": true,
  "writePolicy": "all-members",
  "createdBy": "string",
  "createdAt": "string",
  "memberCount": -9007199254740991
}
```

- `channelId` (`community.channels.update.response.200.channelId`; string, required) — The channel's id.
- `companyName` (`community.channels.update.response.200.companyName`; string, required) — The agency the channel belongs to.
- `name` (`community.channels.update.response.200.name`; string, required) — The channel's name.
- `description` (`community.channels.update.response.200.description`; any of, required) — What the channel is for; null when it says nothing.
  - any of the following: `string`, `null`
- `private` (`community.channels.update.response.200.private`; boolean, required) — Whether the channel is invite-only. A public channel is open to everyone in the agency.
- `writePolicy` (`community.channels.update.response.200.writePolicy`; string, required) — Who may post: all-members, or creator-only for its creator and the writers granted posting.
  - one of `"all-members"`, `"creator-only"`
- `createdBy` (`community.channels.update.response.200.createdBy`; string, required) — The userId of the person who created the channel.
- `createdAt` (`community.channels.update.response.200.createdAt`; string, required) — When the channel was created, as ISO 8601 text.
- `memberCount` (`community.channels.update.response.200.memberCount`; integer, optional) — How many people are in the channel. Only getting and creating a channel answer it.
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 400

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

#### Example

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

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

### 401

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

#### Example

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

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

### 403

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

#### Example

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

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


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