Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameTypeRequiredDescription
tokenStringYesAuthentication token of the user creating the channel
nameStringYesName of the channel (max 255 characters)
purposeStringNoChannel purpose
profileImageStringNoURL of the channel's profile image
typeStringNoCan be "public" or "private". Set to "private" by default.
membersArrayYesA 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:

NameTypeDescription
idStringIdentifier for the channel
membersObjectAn 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 object:

Code Block
languagejs
titleExample
linenumberstrue
{
    "id": "g:fd4877b719b1<id1>",
    "members": {
        "u:<id2>": { "status": "added" },
        "u:<id3>": { "status": "failed", "error": "UserNotFound" }
    }
}