Batch channel update

LAST EDIT May 26 2021

The updateChannels endpoint allows you to partially update many channels at once. Here a few things to keep in mind

  • It implements a partial update. Existing fields on a channel won't be removed

  • Upsert is supported. So if the channel doesn't exist it is created if you've specified the required fields (type, id and created_by_id)

  • Adding members or member invites is supported

Here's a simple example of how to update/create a channel

The endpoint also supports a more advanced syntax for creating members allowing you to send an invite or make someone a moderator

If you need more fine grained control over the update we also support a set/ unset type of syntax. The example below sets the custom field color to green and removes the field favorite_book

There are a few limitations to keep in mind when using this endpoint:

  • Custom data on a channel can't exceed 5KB

  • You can update frozen (boolean), cooldown (integer) and team (string) on a channel but remember to use the right type.

  • Removing members is not supported via this API. If you want to remove a member use the dedicated endpoint for that.

  • The endpoints for updating a single channel allow you to send a message. This is not supported on the batch endpoint

frozenbooleanprevents non-moderators from writing new messages on this channelfalse
teamstringfor team based permissions associated this channel with a given team. be sure to not make mistakes changing a channel's team.-