---
title: "POST /channel.create"
method: POST
path: "/channel.create"
tags: ["channel"]
---

# POST /channel.create

`POST /channel.create`

创建一个讨论组

## Request body

- object
  - `name` string, required — 讨论组名称，可以包含 2 到 20 个英文字符或 1 到 10 个中文字符。允许使用数字、下划线 (`_`)、中线 (`-`) 和点。
  - `topic` string — 讨论组话题
  - `private` boolean — 讨论组是否为私密？

## Response `201`

request success

- Channel
  - `id` string, required
  - `team_id` string, required
  - `uid` string, required
  - `vchannel_id` string, required — 聊天会话 id
  - `name` string, required — 讨论组名称
  - `topic` string, required — 讨论组话题
  - `type` 'normal' | 'session' | 'p2p', required — 聊天会话类型
  - `general` boolean, required — 讨论组是否为`所有人`讨论组？
  - `private` boolean, required — 讨论组是否为私密讨论组？
  - `is_active` boolean, required — 会话是否有效
  - `is_member` boolean, required — 当前用户是否为讨论组成员？
  - `member_uids` ResponseObjectId[], required — 讨论组成员 id 列表
  - `latest_ts` integer, required — 讨论组最新一条消息的 ts

## Other responses

- `default` — request fail

## Changes

- **2017-04-19** `fd4c7a508190` — 1 info
  - api tag `channel` added
- **2017-04-18** `b37660ad33e5` — 1 info
  - api tag `channel` removed
- **2017-04-04** `4751e3946b90` — 1 info
  - api tag `channel` added
- **2017-03-13** `ef71aa691171` — 1 info
  - api tag `channel` removed

[Change history](https://skmtc.dev/bearyinnovative/apis/beary-openapi/changes/channel.create/post.md)

---

[API](https://skmtc.dev/bearyinnovative/apis/beary-openapi.md) · [All operations](https://skmtc.dev/bearyinnovative/apis/beary-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bearyinnovative/beary-openapi/revisions/6e42a0e2d730/schema)
