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

# AddNewBatch

> Add a new batch to a project and assign its owner with the AddNewBatch method of the ABBYY FlexiCapture Web Services API, which returns the new batch ID.

## What it does

Adds a new batch to a project and allows you to specify the owner of the batch (a user or group).

## Definition

```
int AddNewBatch( int sessionId, int projectId, Batch batch, int ownerId);
```

## Parameters

| **Name**  | **Type**                                                    | **Description**                                       |
| --------- | ----------------------------------------------------------- | ----------------------------------------------------- |
| sessionId | int                                                         | The ID of the connection to the Application Server    |
| projectId | int                                                         | The ID of the project to which a batch is to be added |
| batch     | [Batch](/flexi-capture/api/structures/batch-api-structures) | The parameters of the batch to be added               |
| ownerId   | int                                                         | The ID of the user or group who owns the project      |

## Returned value

| **Type** | **Description**             |
| -------- | --------------------------- |
| int      | The ID of the created batch |
