Skip to main content
POST

Overview

Create new chat channels, supporting both personal and group channel creation.

Request Body

Required Parameters

string
required
Channel ID, must be unique
integer
required
Channel type
  • 1 - Personal channel
  • 2 - Group channel

Optional Parameters

integer
default:0
Whether to mute
  • 0 - Allow speaking
  • 1 - Mute all members
integer
default:0
Whether to disband channel
  • 1 - Disband channel (irreversible)
integer
default:0
Whether to prohibit sending messages (0=not prohibited, 1=prohibited). When prohibited, all members in the channel cannot send messages. Personal channels can receive messages but cannot send messages.
integer
default:0
Whether to allow strangers to send messages (0=not allowed, 1=allowed) (this configuration currently only supports personal channels) Personal channel: If AllowStranger is 1, strangers can send messages to the current user. For example: if the current account needs to accept stranger messages, channel_id is the current user’s uid
array
Subscriber list
string
Subscriber user ID

Response Fields

string
required
Operation status, returns "ok" on success

Status Codes

Best Practices

  1. Channel ID Uniqueness: Ensure channel ID is unique in the system
  2. Member Management: Properly set initial subscriber list
  3. Permission Control: Set mute status as needed