Create and manage Community, Live, and Conversation channels — the building blocks of every chat experience.
SDK v7.x · Last verified March 2026 · iOS · Android · Web · Flutter
Speed run — just the code
// Create a Community channelconst channel = await ChannelRepository.createChannel({ type: 'community', displayName: 'General', isPublic: true, tags: ['team', 'general'],});// Query channels the current user is inconst liveCollection = ChannelRepository.getChannels({ sortBy: 'lastActivity', includeDeleted: false,});liveCollection.on('dataUpdated', (channels) => renderChannelList(channels));// Join a channelawait ChannelRepository.joinChannel(channelId);
Full walkthrough below ↓
Platform note — code samples below use TypeScript. Every method has an equivalent in the iOS (Swift), Android (Kotlin), and Flutter (Dart) SDKs — see the linked SDK reference in each step.
Channels are the container for every chat conversation in social.plus. There are three types — Community (public/discoverable), Live (broadcast events), and Conversation (private 1:1 or small group). This guide covers creating and managing all three.
import { ChannelRepository } from '@amityco/ts-sdk';const liveCollection = ChannelRepository.getChannels({ filter: 'member', // channels the current user is in sortBy: 'lastActivity', // most recently active first});// Re-renders whenever a new message arrives or channel is addedliveCollection.on('dataUpdated', (channels) => { channels.forEach(channel => { console.log(channel.displayName, channel.lastActivity); });});
// Update display name and metadataawait ChannelRepository.updateChannel(channelId, { displayName: 'New Name', metadata: { archived_reason: null },});// Archive (hides from list but keeps message history)await ChannelRepository.archiveChannel(channelId);
Community channels and their members can be reviewed and managed from Admin Console → Channels. Moderators can view message history, ban members, and close channels.→ Channel Moderation
Webhook: channel events
Subscribe to channel.created, channel.updated, and channel.deleted webhook events to sync channel data with your own backend or trigger automations.→ Webhook Events
Creating duplicate Conversation channels — For 1:1 DMs, always check if a conversation already exists between two users before creating a new one. Pass both userIds and the SDK will return the existing channel if one exists.
Not handling the Live Collection’s dispose — Always call liveCollection.dispose() when your UI component unmounts to avoid memory leaks and stale update callbacks.
Don’t poll for channel updates. Live Collections push updates automatically — new messages, new channels, and member changes all arrive without any extra requests.
Store custom data in metadata
Use the metadata field to attach any application-specific data to a channel (event ID, category, feature flags). Keep it under 500KB.
Archive instead of delete
Archiving preserves message history — users who rejoin can read old messages. Hard deletion is permanent. Default to archive unless regulatory requirements mandate deletion.
Dive deeper: Conversation Management API Reference has full parameter tables, method signatures, and platform-specific details for every API used in this guide.