This method allows adding members to a given channel. The user adding the members must be a member of the channel and must have permission to modify the member list.

The method endpoint is https://api.flock.co/v1/channels.addMembers and follows the method calling conventions.

Parameters

NameTypeRequiredDescription
tokenStringYesAuthentication token of the user
channelIdStringYesId of the channel
membersArrayYesAn array of user ids that will be added to the channel

Response

An object where the keys are user ids that were to be added and the value is a ChannelMemberStatus, indicating whether the user was successfully added or not.

Example
{
    "members": {
        "u:<id1>": { "status": "added" },
        "u:<id2>": { "status": "failed", "error": "UserNotFound" }
    }
}