---
title: "Method Calls"
slug: "realtime-method-calls"
updated: 2026-05-14T21:31:34Z
published: 2026-05-14T21:41:19Z
canonical: "developer.rocket.chat/realtime-method-calls"
---

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

# Method Calls

> [!WARNING]
> ⚠️ **Warning: D**eprecated
> 
> The DDP methods outlined are deprecated. We are no longer actively testing or maintaining these methods, and their behavior may be unreliable or change without notice. For new development and long-term support, we strongly recommend using the REST APIs instead. Avoid relying on DDP methods for critical functionality.

Method calls are used to send data to the server to perform actions. The response to these calls is asynchronous, meaning they don't occur in a specific order. To track the outcome of a call, it's essential to use a unique ID. This ID will be used in the response, allowing the client to identify and retrieve the result of the corresponding call.

Here is an example of a method call and response for [creating a channel](/v1/docs/create-channels):

## Example call

```json
{
    "msg": "method",
    "method": "createChannel",
    "id": "2",
    "params": [
        "test-websocket",
        ["doe.john"],
        false
    ]
}
```

## Example response

```json
{
    "msg": "result",
    "id": "2",
    "result": [
        { "rid": "BBkfgYT2azf7RPTTg" }
    ]
}
```

> [!NOTE]
> The `id` is the only way to recognize which method call a response belongs to.

You can also perform a method call via REST API using the [Execute a Meteor method call endpoint](/apidocs/execute-a-meteor-method-call).
