---
source_url: https://www.pubnub.com/docs/chat/unity-chat-sdk/build/features/channels/updates
title: Manage channel updates
updated_at: 2026-06-03T11:40:27.010Z
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Manage channel updates

Update channel metadata and receive real-time change events.

:::note Requires App Context
Enable [App Context](https://youtu.be/9UEoSlngpYI) for your keyset in the [Admin Portal](https://admin.pubnub.com/).
:::

## Update channel details

Edit channel metadata with `Update()` or `UpdateChannel()`.

Both methods produce the same result. Call `Update()` on a `Channel` object or `UpdateChannel()` on the `Chat` object with the channel ID.

### Method signature

These methods take the following parameters:

* Update() 1channel.Update(ChatChannelData updatedData)2 3public class ChatChannelData4{5 public string Name { get; set; } = string.Empty;6 public string Description { get; set; } = string.Empty;7 public Dictionary<string, object> CustomData { get; set; } = new ();8 public string Status { get; set; } = string.Empty;9 public string Type { get; set; } = string.Empty;10}
* UpdateChannel() 1chat.UpdateChannel(2 string channelId, 3 ChatChannelData updatedData4)5 6public class ChatChannelData7{8 public string Name { get; set; } = string.Empty;9 public string Description { get; set; } = string.Empty;10 public Dictionary<string, object> CustomData { get; set; } = new ();11 public string Status { get; set; } = string.Empty;12 public string Type { get; set; } = string.Empty;13}

#### Input

| Parameter | Required in Update() | Required in UpdateChannel() | Description |
| --- | --- | --- | --- |
| channelId | string | Optional |  | No | Yes | Unique channel identifier. |
| > Name | string | Optional |  | No | No | Display name for the channel. |
| > Description | string | Optional |  | No | No | Additional details about the channel. |
| > CustomData | Dictionary<string, | Optional |  | No | No | JSON providing custom data about the channel. Values must be scalar only; arrays or objects are not supported. [App Context filtering language](https://www.pubnub.com/docs/general/metadata/filtering) doesn’t support filtering by custom properties. |
| > Status | string | Optional |  | No | No | Tag that categorizes a channel by its state, like `archived`. |
| > Type | string | Optional |  | No | No | Tag that categorizes a channel by its function, like `offtopic`. |

:::tip API limits
To learn about the maximum length of parameters used to set channel metadata, refer to [REST API docs](https://www.pubnub.com/docs/sdks/rest-api/set-channel-metadata).
:::

#### Output

An awaitable `Task<ChatOperationResult>`.

### Sample code

Update the description of the `support` channel.

* Update() using System; using System.Collections.Generic; using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using Channel = PubnubChatApi.Channel; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } var channelResult = await chat.GetChannel("support"); if (channelResult.Error) { Debug.Log("Couldn't find channel!"); return; } var channel = channelResult.Result; var updatedChannelData = new ChatChannelData { Description = "Channel for CRM tickets" }; await channel.Update(updatedChannelData);
* UpdateChannel() using System; using System.Collections.Generic; using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using Channel = PubnubChatApi.Channel; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } var updatedChannelData = new ChatChannelData { Description = "Channel for CRM tickets" }; await chat.UpdateChannel("support", updatedChannelData);

## Get channel updates

Receive updates when [Channel objects](https://www.pubnub.com/docs/chat/unity-chat-sdk/learn/chat-entities/channel) are edited or deleted:

* `StreamUpdates()` - monitors a single channel
* `StreamUpdatesOn()` - monitors multiple channels

Both methods accept a callback invoked when channel metadata changes. They subscribe to a channel and add an [objects event listener](https://www.pubnub.com/docs/sdks/unity/api-reference/configuration#event-listeners) for `channel` events.

Call `StreamUpdates(true)` to enable the `OnUpdated` and `OnDeleted` events on the channel entity. `OnUpdated` fires when channel metadata changes. `OnDeleted` fires when the channel is hard-deleted from App Context.

:::tip Method naming
Earlier versions used `SetListeningForUpdates()` to enable streaming. This method has been superseded by `StreamUpdates()`, though it remains available for backward compatibility.
:::

### Method signature

These methods take the following parameters:

* StreamUpdates() 1channel.StreamUpdates(bool stream)
* OnUpdated 1// event on the Channel entity2public event Action<Channel> OnUpdated;3// needs a corresponding event handler4void EventHandler(Channel channel)
* OnDeleted 1// event on the Channel entity2public event Action OnDeleted;3// needs a corresponding event handler4void EventHandler()
* StreamUpdatesOn() (static) 1Channel.StreamUpdatesOn(2 List<Channel> channels,3 Action<Channel> listener4)

#### Input

| Parameter | Required in `StreamUpdates()` | Required in `OnUpdated` / `OnDeleted` | Required in `StreamUpdatesOn()` | Description |
| --- | --- | --- | --- | --- |
| `stream`Type: `bool`Default: n/a | Yes | n/a | n/a | Whether to start (`true`) or stop (`false`) listening to `Channel` object updates. |
| `channels`Type: `List<Channel>`Default: n/a | No | No | Yes | List of [Channel objects](https://www.pubnub.com/docs/chat/unity-chat-sdk/learn/chat-entities/channel) for which you want to get updates. |
| `listener`Type: `Action<Channel>`Default: n/a | No | No | Yes | Callback that receives the specific channel that was updated. |

#### Output

These methods don't return a value. Updates are delivered through event handlers or callback functions.

### Sample code

* StreamUpdates() and OnUpdated Get updates on the support channel. using System; using System.Collections.Generic; using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using Channel = PubnubChatApi.Channel; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } var channelResult = await chat.GetChannel("support"); if (channelResult.Error) { Debug.Log("Couldn't find channel!"); return; } var channel = channelResult.Result; channel.StreamUpdates(true); channel.OnUpdated += OnChannelUpdateHandler; // or use lambda void OnChannelUpdateHandler(Channel channel) { Debug.Log($"Channel updated: {channel.Id}"); }
* StreamUpdatesOn() Get updates on the support and incidentManagement channels. using System; using System.Collections.Generic; using System.Threading.Tasks; using PubnubApi; using PubnubChatApi; using Channel = PubnubChatApi.Channel; using UnityEngine; // Configuration PubnubChatConfig chatConfig = new PubnubChatConfig(); PNConfiguration pnConfiguration = new PNConfiguration(new UserId("myUniqueUserId")) { SubscribeKey = "demo", PublishKey = "demo", Secure = true }; // Initialize Unity Chat var chatResult = await UnityChat.CreateInstance(chatConfig, pnConfiguration); if (!chatResult.Error) { chat = chatResult.Result; } var channels = new List<Channel>(); var channel1 = await chat.GetChannel("support"); var channel2 = await chat.GetChannel("incidentManagement"); if (!channel1.Error && !channel2.Error) { channels.Add(channel1.Result); channels.Add(channel2.Result); } Action<Channel> listener = (channel) => { // Print the updated channel name and the change type Debug.Log("Updated Channel Name: " + channel.Name); }; Channel.StreamUpdatesOn(channels, listener);