---
title: "Subscriptions"
slug: "subscriptions-method-calls"
updated: 2026-05-14T21:32:46Z
published: 2026-05-14T21:52:17Z
canonical: "developer.rocket.chat/subscriptions-method-calls"
stale: true
---

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

# Subscriptions

Streams are a way of plugging into a continuous source of updates (changes). Any subscriber registered will receive the latest changes from the server as they occur.

## Subscribe to a stream

To subscribe to a stream, you must send a message with `msg` as `sub`, a unique ID, the stream name, and the parameters to be applied on the stream.

```json
{
    "msg": "sub",
    "id": "unique-id",
    "name": "the-stream",
    "params":[ "event", false ]
}
```

> [!WARNING]
> You must be logged in before you send any subscription request.

Recent changes to the stream API aim to notify subscribers about changes more selectively, which could cause issues with existing drivers. To ensure compatibility, the `back-compatibility` boolean parameter is suggested as the last option. If set to `true`, subscribers will receive an "add" event whenever something new is created. This parameter allows subscribers to decide if they need to be notified about all changes or only specific ones, keeping things compatible with older drivers.

## Unsubscribe from a stream

To unsubscribe from a room, send this request:

```json
{
    "msg": "unsub",
    "id": "subscription-id"
}
```

The response will look like this:

```json
{
    "msg": "nosub",
    "id": "subscription-id"
}
```

When you make a call to an invalid or non-existent `subscription_id`, the response will not produce an error. Instead, it will respond with at least a "msg" field set to "nosub" and include the provided `id` value. If no `id` was provided, the `id` field will be omitted from the response.
