Page History
...
Name | Type | Required | Description |
---|---|---|---|
token | String | Yes | Authentication token of the user creating the channel |
name | String | Yes | Name of the channel (max 255 characters) |
purpose | String | No | Channel purpose |
profileImage | String | No | URL of the channel's profile image |
type | String | No | Can be "public" or "private" . Set to "private" by default. |
members | Array | Yes | A list of user identifiers to be added to the channel |
Response
In response, the channel identifier is returned.
The response object has the following attributes:
Name | Type | Description |
---|---|---|
id | String | Identifier for the channel |
members | Object | An object whose keys are user ids of the members who were added and values are ChannelMemberStatus objects, indicating whether the addition was successful or not. |
Here's an example response:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "id": "g:fd4877b719b1<id1>", "members": { "u:<id2>": { "status": "added" }, "u:<id3>": { "status": "failed", "error": "UserNotFound" } } } |