Overview
The Channel Members API allows you to add users to channels, update their preferences, and remove them from channels. Each channel member has individual settings for notifications, visibility, and favorites. All operations require authentication and appropriate permissions.Methods
channelMember.create
Adds the current user to a channel. The userId is automatically set from the authenticated user. Requires permission to join the channel (e.g., public channels or organization admin).Channel ID to join
Transaction ID for optimistic updates
ChannelNotFoundError- Channel doesn’t existUnauthorizedError- User lacks permission to join channelInternalServerError- Unexpected server error
channelMember.update
Updates channel member preferences and settings. Members can update their own preferences (mute, hide, favorite). Organization admins can update any member’s settings.Channel member ID to update
Whether to hide the channel in the sidebar
Whether to mute notifications for this channel
Whether to mark the channel as favorite
ID of the last message seen by the user
Number of unread notifications (typically managed by system)
Updated channel member object (see channelMember.create for structure)
Transaction ID for optimistic updates
ChannelMemberNotFoundError- Channel member doesn’t existUnauthorizedError- User lacks permission to update memberInternalServerError- Unexpected server error
channelMember.delete
Removes a user from a channel (soft delete). Members can leave channels themselves. Organization admins can remove any member from a channel.Channel member ID to delete
Transaction ID for optimistic updates
ChannelMemberNotFoundError- Channel member doesn’t existUnauthorizedError- User lacks permission to remove memberInternalServerError- Unexpected server error
channelMember.clearNotifications
Clears the notification count for the current user in a specific channel. Called when a user views/enters a channel to reset their unread notification count.Channel ID to clear notifications for
Transaction ID for optimistic updates
ChannelNotFoundError- Channel doesn’t existUnauthorizedError- User is not a member of the channelInternalServerError- Unexpected server error