---
source_url: https://www.pubnub.com/docs/general/basics/react-to-events
title: React to events
updated_at: 2026-06-25T11:25:33.249Z
---

> 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


# React to events

Various actions in a PubNub app generate system‑wide events. For example, you may receive an event each time a user sends a message: “Emma has sent a new message.”

Handling message events is one case. You might also respond to PubNub API calls. Examples include translating messages in flight, blocking profanity, sending data for sentiment analysis, or processing GPS coordinates. You can do this in the client. To modify logic quickly and centrally, use server‑side handling.

To handle events in your SDK, use subscription listeners. For all event types and their payload fields, see [Event Types](https://www.pubnub.com/docs/general/events).

Events & Actions lets you react to these events by triggering server‑side business logic without writing code.

Events & Actions includes two parts:

* [Event listeners](https://www.pubnub.com/docs/serverless/events-and-actions/overview#event-listeners) wait for PubNub events and trigger actions.
* [Actions](https://www.pubnub.com/docs/serverless/events-and-actions/overview#actions) define how to handle data when an event listener fires.

To start, go to the [Admin Portal](https://admin.pubnub.com), select your keyset, and open the **Events & Actions** view. There you [create, configure, modify, and remove](https://www.pubnub.com/docs/serverless/events-and-actions/configure-e&a) event listeners and actions. You can manage them in a graphical interface, which makes setup quick and easy.

![Events &amp; Actions User Interface](https://www.pubnub.com/assets/images/e&a-ui-basics-4f3dc7a60fe720d290e6ef5de718fdf1.png)

You can also create [Functions](https://www.pubnub.com/docs/general/basics/add-serverless-business-logic) with custom JavaScript that run when events occur.

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.
