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

# Connection Lifecycle

> Every frame in both directions is a single JSON object. Here is what the server sends the moment your connection is accepted.

Every frame exchanged over the stream, in either direction, is a single JSON object. This page covers what happens right after the WebSocket upgrade completes.

## The ack frame

On a successful upgrade, the server speaks first and sends an `ack` frame describing the account you connected as:

```json theme={null}
{
    "type": "ack",
    "plan": "starter",
    "owner": "3f2c...",
    "limits": { "max_channels": 10, "max_connections": 2 }
}
```

> [!WARNING]
>
> Consume the `ack` frame before sending any commands. It tells you the effective plan and limits for this connection, which you should read at runtime rather than assume.

Once you've read the `ack`, you're ready to send `subscribe` commands. See [Commands](https://docs.metar.ws/protocol/commands.md) for the request and response shapes.

> [card] [Next: Commands](https://docs.metar.ws/protocol/commands.md)
>
> Learn how to subscribe and unsubscribe from channels.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.