---
title: "BatchV2.make"
description: "Method for executing batch requests to Bitrix24 REST API version 2. Allows executing up to 50 commands in a single API call."
canonical_url: "https://bitrix24.github.io/b24jssdk/docs/working-with-the-rest-api/batch-rest-api-ver2"
last_updated: "2026-05-08"
---
# BatchV2.make

> Method for executing batch requests to Bitrix24 REST API version 2. Allows executing up to 50 commands in a single API call.

> [!WARNING]
> We are still updating this page. Some data may be missing here — we will complete it shortly.

## Overview

Use `BatchV2.make()` to execute up to 50 REST API commands in a single request. This is especially useful when you need to retrieve or update large amounts of data while minimizing network requests and adhering to REST API limits.

```ts
// Basic usage
import { EnumCrmEntityTypeId } from '@bitrix24/b24jssdk'

const response = await $b24.actions.v2.batch.make({
  calls: [
    ['crm.item.get', { entityTypeId: EnumCrmEntityTypeId.contact, id: 1 }],
    ['crm.item.get', { entityTypeId: EnumCrmEntityTypeId.contact, id: 2 }]
  ],
  options: {
    isHaltOnError: true,
    returnAjaxResult: true,
    requestId: 'unique-request-id'
  }
})
```

## Method Signature

```ts-type
make<T = unknown>(
  options: ActionBatchV2
): Promise<CallBatchResult<T>>
```

### Parameters

The `options` object contains the following properties:

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| **`calls`** | `BatchCommandsArrayUniversal|BatchCommandsObjectUniversal|BatchNamedCommandsUniversal` | Yes | Commands to execute in the batch. Supports several formats . |
| **`options`** | `IB24BatchOptions` | No | Additional options for batch request execution. |

### Command Formats (`options.calls`)

#### 1. Array of tuples (`BatchCommandsArrayUniversal`)

```ts
calls: [
  ['method1', params1],
  ['method2', params2],
  // ...
]
```

#### 2. Array of objects (`BatchCommandsObjectUniversal`)

```ts
calls: [
  { method: 'method1', params: params1 },
  { method: 'method2', params: params2 },
  // ...
]
```

#### 3. Object with named commands (`BatchNamedCommandsUniversal`)

```ts
calls: {
  command1: { method: 'method1', params: params1 },
  command2: ['method2', params2],
  // ...
}
```

### Batch Request Options (`options.options`)

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| **`isHaltOnError`** | `boolean` | `true` | Whether to stop execution on the first error. |
| **`returnAjaxResult`** | `boolean` | `false` | Whether to return an `AjaxResult` object instead of data. |
| **`requestId`** | `string` | — | Unique request identifier for tracking. Used for request deduplication and debugging. |

### Return Value

`Promise<CallBatchResult<T>>` — a promise that resolves to a `CallBatchResult<T>` object.

The result structure depends on the input data format:

- **For array of commands**: array of results in the same order.
- **For named commands**: object with keys corresponding to command names.

## Error Handling

Always check the result using `isSuccess` and handle errors:

```ts
const response = await $b24.actions.v2.batch.make({
  calls: [
    { method: 'crm.item.get', params: { entityTypeId: EnumCrmEntityTypeId.contact, id: 1 } },
    { method: 'crm.item.get', params: { entityTypeId: EnumCrmEntityTypeId.contact, id: 2 } }
  ],
  options: {
    isHaltOnError: true,
    returnAjaxResult: true,
    requestId: 'unique-request-id'
  }
})

if (!response.isSuccess) {
  // Handling error
  console.error(new Error(`Error: ${response.getErrorMessages().join('; ')}`))
  return
}

// Working with a successful result
const data = response.getData()
```

## Examples

### Getting Multiple CRM Companies

```ts [batch-rest-api-ver2.ts]
? visitAndReplace ?
```

### Init Data Storage

This code automates the creation and initialization of data storages in Bitrix24 via the REST API.

It checks the existence of the specified storages and, if they don't exist, creates them along with the specified properties, using batch requests for efficiency.

```ts [batch-rest-api-ver2-data-storage.ts]
? visitAndReplace ?
```

### Delete Data Storage

This code deletes multiple data storages in the Bitrix24 system via the REST API.

It sequentially sends delete requests for each data storage specified in the dataStorageMap using the entity.delete method.

```ts [batch-rest-api-ver2-data-storage-delete.ts]
? visitAndReplace ?
```

## Alternatives and Recommendations

- **For sequential requests**: Use [`Call`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/call-rest-api-ver2.md) for single calls.
- **For working with lists**: Use [`CallList`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/call-list-rest-api-ver2.md) for retrieving large volumes of data.
- **For step-by-step processing**: Use [`FetchList`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/fetch-list-rest-api-ver2.md) for processing data as it arrives.
- **To run more commands (more than 50)**: Use [`BatchByChunk`](https://bitrix24.github.io/b24jssdk/raw/docs/working-with-the-rest-api/batch-by-chunk-rest-api-ver2.md), which automatically splits commands into chunks of 50.
- **On the client-side (browser):** Use the built-in [`B24Frame`](https://bitrix24.github.io/b24jssdk/raw/docs/getting-started/installation/vue.md#init) object.

## Sitemap

See the full [sitemap](/b24jssdk/sitemap.md) for all pages.
