---
source_url: https://www.pubnub.com/docs/chat/unreal-chat-sdk/learn/chat-entities/chat
title: Chat object
updated_at: 2026-07-28T11:03:36.861Z
---

> 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


# Chat object

The `Chat` object is your entry point to the Chat SDK after [initialization](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration). Use the `Chat` object to create and manage channels, users, messages, memberships, and other entities.

Key capabilities:

* Create and delete channels and users
* Track user presence across channels
* Send custom events
* Access the underlying Unreal SDK

## Properties

The `Chat` object is returned and initialized by the following operation:

```cpp
UPubnubChatSubsystem* PubnubChatSubsystem = GameInstance->GetSubsystem<UPubnubChatSubsystem>();

FPubnubChatInitChatResult InitResult = PubnubChatSubsystem->InitChat("demo", "demo", "my_user");
UPubnubChat* Chat = InitResult.Chat;
```

The subsystem supports **multiple simultaneous chat instances** keyed by `UserID`. Retrieve a specific chat instance with `GetChat(UserID)`.

To initialize the Unreal Chat SDK, you must provide three parameters: `Publish Key`, `Subscribe Key`, and `User ID`, while all other settings are optional. Read the [Configuration](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration) page for details.

## Methods

You can call the following methods on the `Chat` object.

Click on each method for more details.

* [CreateDirectConversation()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create#create-direct-channel)
* [CreateGroupConversation()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create#create-group-channel)
* [CreatePublicConversation()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create#create-public-channel)
* [CreateThreadChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/threads#create-thread)
* [CreateUser()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/create)
* [DeleteChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/delete)
* [DeleteUser()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/delete)
* [DisconnectSubscriptions()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/connection-management#disconnect-subscriptions)
* [ForwardMessage()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/forward)
* [GetAccessManager()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration#get-access-manager)
* [GetChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/details)
* [GetChannels()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/list)
* [GetChannelSuggestions()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/references)
* [GetCurrentUser()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/learn/chat-entities/user)
* [GetEventsHistory()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/custom-events#get-historical-events)
* [GetPubnubClient()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/configuration)
* [GetThreadChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/threads#get-thread)
* [GetUnreadMessagesCounts()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/unread#get-unread-messages-count-all-channels)
* [GetUser()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/details#get-user-details)
* [GetUsers()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/list)
* [GetUserSuggestions()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/mentions)
* [IsPresent()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/presence#check-users-channel-presence)
* [MarkAllMessagesAsRead()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/unread#mark-messages-as-read-all-channels)
* [PinMessageToChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/pinned)
* [ReconnectSubscriptions()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/connection-management#reconnect-subscriptions)
* [RemoveThreadChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/threads#remove-thread)
* [SetRestrictions()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/moderation#mute-or-ban-users)
* [UnpinMessageFromChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/messages/pinned)
* [UpdateChannel()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/updates#update-channel-details)
* [UpdateUser()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/updates#update-user-details)
* [WherePresent()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/presence#return-channels-where-user-is-present)
* [WhoIsPresent()](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/presence#return-all-users-present-on-channel)

## Use case

For example, you can use the `Chat` object methods to:

* Create a [channel](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/create) or [user](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/create).
* Get [channel](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/channels/details) or [user](https://www.pubnub.com/docs/chat/unreal-chat-sdk/build/features/users/details#get-user-details) data.