---
source_url: https://www.pubnub.com/docs/chat/kotlin-chat-sdk/learn/chat-entities/chat
title: Chat object
updated_at: 2026-06-23T11:42:06.311Z
---

> 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/kotlin-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 Kotlin SDK

## Properties

The `Chat` interface has the following properties:

```kotlin
interface Chat {
    val config: ChatConfiguration
    val pubNub: PubNub
    val currentUser: User
    val syncMutedUsers: Boolean
    val mutedUsersManager: MutedUsersManager

    ...
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| config | ChatConfiguration | Optional |  | `ChatConfiguration` contains chat app configuration settings, such as `logLevel` or `typingTimeout` that you can provide when initializing your chat app with the [init()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/configuration#initialize-pubnub) method. You can later directly access these properties, like: `chat.storeUserActivityInterval`. |
| pubNub | PubNub | Optional |  | `pubNub` lets you access any [Kotlin SDK](https://www.pubnub.com/docs/sdks/kotlin) method. For example, if you want to call a method available in the App Context API, you'd use [chat.pubNub.getAllUUIDMetadata()](https://www.pubnub.com/docs/sdks/kotlin/api-reference/objects#user). |
| currentUser | User | Optional |  | User object representing current user. |
| syncMutedUsers | Boolean | Optional |  | Whether the mute list is synchronized across sessions and devices. Corresponds to the [syncMutedUsers](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/configuration#sync-muted-users) configuration parameter. |
| mutedUsersManager | MutedUsersManager | Optional |  | Manager object for muting and unmuting users on the client side. See [Moderate misbehaving users](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/moderation-user) for details. |

`ChatConfiguration` includes these properties:

```kotlin
interface ChatConfiguration {
    val logLevel: LogLevel
    val typingTimeout: Duration
    val storeUserActivityInterval: Duration
    val storeUserActivityTimestamps: Boolean
    val pushNotifications: PushNotificationsConfig
    val rateLimitFactor: Int
    val rateLimitPerChannel: Map<ChannelType, Duration>
    val customPayloads: CustomPayloads?
    val emitReadReceiptEvents: Map<ChannelType, Boolean>
    val syncMutedUsers: Boolean
}
```

`PushNotificationsConfig` includes these properties:

```kotlin
class PushNotificationsConfig(
    val sendPushes: Boolean,
    val deviceToken: String?,
    val deviceGateway: PNPushType,
    val apnsTopic: String?,
    val apnsEnvironment: PNPushEnvironment
)
```

Initialize the Chat SDK with two required parameters: `subscribeKey` and `userId`. All other settings are optional. See [Configuration](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/configuration) for details.

## Methods

The `Chat` object exposes the following methods.

### Regular methods

* [createUser()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/create)
* [createDirectConversation()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/create#create-direct-channel)
* [createGroupConversation()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/create#create-group-channel)
* [createPublicConversation()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/create#create-public-channel)
* [currentUser](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/details#get-current-user)
* [deleteChannel()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/delete)
* [deleteUser()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/delete)
* [destroy()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/configuration#destroy-chat-instance)
* [fetchUnreadMessagesCounts()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/messages/unread#get-unread-messages-count-all-channels)
* [getChannel()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/details)
* [getChannelGroup()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/channel-groups#get-channel-group-reference)
* [getChannels()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/list)
* [getCurrentUserMentions()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/mentions#collect-all-user-related-mentions)
* [getEventsHistory()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/custom-events#get-historical-events)
* [getPushChannels()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/push-notifications#list-all-push-channels)
* [getUser()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/details#get-user-details)
* [getUsers()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/list)
* [init()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/configuration#initialize-pubnub)
* [isPresent()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/presence#check-users-channel-presence)
* [markAllMessagesAsRead](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/messages/unread#mark-messages-as-read-all-channels)
* [registerPushChannels()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/push-notifications#register-selected-push-channels)
* [removeChannelGroup()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/channel-groups#remove-channel-group)
* [setRestrictions()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/moderation#mute-or-ban-users-as-an-administrator)
* [unregisterPushChannels()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/push-notifications#unregister-selected-push-channels)
* [unregisterAllPushChannels()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/push-notifications#unregister-all-push-channels)
* [updateChannel()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/channels/updates#update-channel-details)
* [updateUser()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/updates#update-user-details)
* [wherePresent()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/presence#return-channels-where-user-is-present)
* [whoIsPresent()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/presence#return-all-users-present-on-channel)
* emitEvent() (deprecated — use [Channel.emitCustomEvent()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/custom-events#create-and-send-events) instead)

### Event listeners

* [addConnectionStatusListener()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/connection-management)
* [disconnectSubscriptions()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/connection-management)
* [reconnectSubscriptions()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/connection-management)
* listenForEvents() (deprecated — use entity-level methods like [Channel.onCustomEvent()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/custom-events#receive-current-events), [User.onMentioned()](https://www.pubnub.com/docs/chat/kotlin-chat-sdk/build/features/users/mentions#show-notifications-for-mentions), etc.)

## Use case

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

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