

# Event (Subscribe)
<a name="actions-event-subscribe"></a>

Events are messages generated by client actions or operations; e.g., join or leave notifications. Events may be generated by Amazon IVS Chat or your application. Use SendEvent (see the [Amazon IVS Chat API Reference](https://docs.aws.amazon.com/ivs/latest/ChatAPIReference/Welcome.html)) to push event messages to the room.

## Format
<a name="event-format"></a>

```
{
  "Attributes": { "string": "string" },
  "EventName": "string",
  "Id": "string",
  "RequestId" : "string",
  "SendTime": "string::date-time",
  "Type": "EVENT"
}
```

## Fields
<a name="event-fields"></a>


| Field | Description | 
| --- | --- | 
| `Attributes` | For application-generated events, this contains details of the event; e.g., `user_id`, `display_name`, and/or anything you want. For the system-generated event (`aws:DELETE_MESSAGE`), this contains three fields: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ivs/latest/chatmsgapireference/actions-event-subscribe.html)  | 
| `EventName` | For application-generated events, this is preferably an enum used by client logic; e.g., `user_joined`. There is one system-generated event. Its `EventName` is `aws:DELETE_MESSAGE`.  | 
| `Id` |  An identifier generated by Amazon IVS Chat. | 
| `RequestId` | An identifier optionally specified by your application (in the corresponding [SendEvent](https://docs.aws.amazon.com/ivs/latest/ChatAPIReference/API_SendEvent.html)) for tracking purposes. | 
| `SendTime` | Timestamp of when the message was received by Amazon IVS Chat. | 
| `Type` | `EVENT` | 