> ## Documentation Index
> Fetch the complete documentation index at: https://www.plain.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> Log important events to have the full picture of what happened in Plain.

<Snippet file="graphql/sdk-note.mdx" />

When helping a customer it can be useful to have context about their recent activity in your product. For example, if someone is getting in touch about a 401 error, it could be important to know that they recently deleted an API key in their settings.

Events are created via the Plain API and you have full control of what they look like using Plain's UI components.

There are two types of events

* **[Customer events](/graphql/events/create-customer-event)**: these are created in every existing thread for a customer. When a new thread is created (e.g. by an inbound communication, or by calling the [createThread](/graphql/threads/create) endpoint) the **25** most recent events are shown.
* **[Thread events](/graphql/events/create-thread-event)**: these events belong to a single thread, and only appear in a single thread's timeline.

## UI Components

To define what each event should look like, you use the Plain UI components. All the components are documented in the [Plain UI Components](/ui-components/) section.

### Playground

The UI Components Playground lets you build and preview the component JSON used to create an event. Use this to prototype an event before starting to build your integration.

[**UI Components Playground →**](https://app.plain.com/developer/ui-components-playground/)
