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

# Supported Actions

> Details about available actions for maintaining and replaying WebSocket sessions.

This page lists the supported actions you can use to interact with the Benzinga WebSocket API. These actions help maintain session health and access recent message history.

<Note>
  You cannot control the number of messages returned by the `list` action. The actual count depends on the number of messages currently cached for a given key.
</Note>

## Available Actions

| Action   | Description                                                                                                                | Example  |
| -------- | -------------------------------------------------------------------------------------------------------------------------- | -------- |
| `replay` | Replays up to the last 100 messages. The number of messages returned may vary depending on cache availability for the key. | `replay` |
| `ping`   | Keeps the WebSocket session alive by sending a heartbeat signal.                                                           | `ping`   |

## Example Usage

**Send an action through your WebSocket client using the following format:**
Sample usage of ping:

```bash theme={null}
ping
```

Response:

```bash theme={null}
pong
```

Sample usage of replay:

```bash theme={null}
replay
```

Response:

```json theme={null}
{
  "id": "unique-uuid-for-response",
  "api_version": "websocket/v1",
  "kind": "stream_type",
  "data": {
    "action": "created/updated/deleted",
    "id": "insight-id",
    "content": {
      ...  
    },
    "timestamp": "2024-10-08T10:00:00Z"
  }
}
```
