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

# PlayStream events

> Compare PlayFabGenerated and UserGenerated PlayStream events, then ingest them with WriteEvents, WritePlayerEvent, WriteCharacterEvent, or WriteTitleEvent APIs.

To ingest data with PlayStream, you can utilize four different APIs: [WriteEvents](https://learn.microsoft.com/en-us/rest/api/playfab/events/play-stream-events/write-events), [WritePlayerEvent](https://learn.microsoft.com/en-us/rest/api/playfab/server/analytics/write-player-event), [WriteCharacterEvent](https://learn.microsoft.com/en-us/rest/api/playfab/server/analytics/write-character-event), and [WriteTitleEvent](https://learn.microsoft.com/en-us/rest/api/playfab/server/analytics/write-title-event).

## PlayFabGenerated Events vs UserGenerated Events

There are two types of events available: **PlayFabGenerated** and **UserGenerated**. Both event types are player-ordered, meaning that if multiple APIs are called in a specific order, any actions triggered by the events will be executed in the same order as the API calls.

PlayFabGenerated events are created by PlayFab through a normal API call.

UserGenerated events, on the other hand, are created by developers, who define their structure and data, and are specific to their games. These events are fully reflected through real-time analytics tools and unlike standard events, you need some custom code to post them.

UserGenerated events can be classified by entity and can be bound to a player, character, or title. An event entity reference is specified using these two fields:

* EntityType
* EntityID

The following is a comparison table between some PlayFabGenerated and UserGenerated events characteristics.

| Characteristic | PlayFabGenerated Events | UserGenerated Events |
| - | - | - |
| Generated by | PlayFab Services | The developers |
| Schema | Standard schema (defined by PlayFab) | Mostly Custom schema (defined by developers) |
| Reports and templates | Used in common reports and templates | Not used in reports or templates |
| Event Namespace | V1: "com.playfab"  V2: "events" | V1: "title"  V2: "custom" |
| How to emit? | N/A | V1: WriteTitleEvent, WritePlayerEvent, WriteCharacterEvent  V2: WriteEvents |

## Standard-schema Events vs Custom-schema Events

Within PlayFab, you can utilize both PlayFabGenerated standard-schema and UserGenerated custom-schema events, although the latters are relatively limited in number.

In the following table, you can find examples of these two types of events.

| Schema Type | PlayFabGenerated Events | UserGenerated Events |
| - | - | - |
| Standard Schema | [player\_logged\_in](/services/playfab/api-references/events/PlayerIdentity/player-logged-in)  [entity\_created](/services/playfab/api-references/events/PlayerIdentity/entity-created) | [client\_focus\_change](/services/playfab/api-references/events/Session/client-focus-change)  [client\_session\_start](/services/playfab/api-references/events/Session/client-session-start) |
| Custom Schema | N/A | Free-style |


## Related topics

- [PlayStream](/services/playfab/data-analytics/ingest-data/playstream-overview.md)
- [PlayStream event capabilities](/services/playfab/data-analytics/ingest-data/playstream-event-capabilities.md)
- [PlayStream Event Model reference](/services/playfab/api-references/events/index.md)
- [Game Saves PlayStream events](/services/playfab/player-progression/game-saves/playstream-events.md)
- [Leaderboards with PlayStream and Telemetry](/services/playfab/community/leaderboards/leaderboards-with-playstream-and-telemetry.md)
