> ## 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.

# Commands

> Two client commands, subscribe and unsubscribe, selected by the top-level action field.

The client sends exactly two kinds of command, selected by the top-level `action` field.

## Subscribe

```json theme={null}
{"action": "subscribe", "channels": ["metar.obs.eglc", "metar.obs.rksi"]}
```

The server validates each channel in the batch independently. If one channel name is invalid, the rest of the batch still subscribes successfully, and the bad channel gets its own `error` frame.

```json theme={null}
{"type": "subscribed", "channels": ["metar.obs.eglc", "metar.obs.rksi"]}
```

## Unsubscribe

```json theme={null}
{"action": "unsubscribe", "channels": ["metar.obs.eglc"]}
```

```json theme={null}
{"type": "unsubscribed", "channels": ["metar.obs.eglc"]}
```

Unknown channels passed to `unsubscribe` are silently ignored rather than producing an error.

> [card] [Next: Publication Messages](https://docs.metar.ws/protocol/messages.md)
>
> See the shape of the messages the server pushes to you.


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