---
source_url: https://www.pubnub.com/docs/chat/unity-chat-sdk/learn/chat-entities/event
title: Event object
updated_at: 2026-06-12T11:23:20.804Z
---

> 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


# Event object

`Event` represents a single piece of information emitted during chat operations: typing indicators, message receipts, mentions, or reports.

Unlike other Chat SDK entities, `Event` provides no methods - it only passes payloads emitted during chat operations.

## Properties

`ChatEvent` has the following properties:

```csharp
public struct ChatEvent
{
    public string TimeToken;
    public PubnubChatEventType Type;
    public string ChannelId;
    public string UserId;
    public string Payload;
}
```

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| TimeToken | string | Optional |  | Timetoken of the message that triggered an event. |
| Type | PubnubChatEventType | Optional |  | Type of action that emits an event: `Typing`, `Report`, `Receipt`, `Mention`, `Invite`, `Custom`, and `Moderation`. |
| ChannelId | string | Optional |  | Target channel where this event is delivered. |
| UserId | string | Optional |  | [Unique ID](https://www.pubnub.com/docs/general/setup/users-and-devices) of the user that triggered the event. |
| Payload | string | Optional |  | Data passed in an event that differ depending on the event type. |

For details, refer to the [chat events documentation](https://www.pubnub.com/docs/chat/unity-chat-sdk/build/features/custom-events).

### Typed event data

Streaming methods on entities deliver typed data structs instead of raw `ChatEvent` objects. The following typed event structs are available:

```csharp
public struct Invite
{
    public string ChannelId;
    public string ChannelType;
    public string InvitedByUserId;
    public string Timetoken;
}

public struct Mention
{
    public string Text;
    public string MessageTimetoken;
    public string ChannelId;
    public string? ParentChannelId;
    public string MentionedByUserId;
}

public struct MessageReport
{
    public string Reason;
    public string Text;
    public string MessageTimetoken;
    public string ReportedMessageChannelId;
    public string ReportedUserId;
    public string AutoModerationId;
}

public struct ReadReceipt
{
    public string UserId;
    public string LastReadTimeToken;
}
```

| Struct | Used by | Description |
| --- | --- | --- |
| `Invite` | `User.OnInvited` | Delivered when a user is invited to a channel. Contains the channel ID, channel type, inviter user ID, and timetoken. |
| `Mention` | `User.OnMentioned` | Delivered when a user is mentioned. Contains the message text, timetoken, channel, optional parent channel (for threads), and the mentioner's user ID. |
| `MessageReport` | `Channel.OnMessageReported` | Delivered when a message is reported. Contains the reason, text, timetoken, channel, reported user, and optional auto-moderation ID. |
| `ReadReceipt` | `Channel.OnReadReceiptEvent` | Delivered when a read receipt is received. Contains the user ID and last read timetoken. |

## Use case

Events enable:

* Collecting historical chat events
* Creating [custom events](https://www.pubnub.com/docs/chat/unity-chat-sdk/build/features/custom-events)
* Building moderation dashboards for flagged messages
* Triggering business logic with [Functions](https://www.pubnub.com/docs/serverless/functions/overview)