---
title: "Setup a Batch"
method: POST
path: "/api/v1/data-collection/batches/{batch_id}/setup"
tags: ["aiTaskBuilder"]
---

# Setup a Batch

`POST /api/v1/data-collection/batches/{batch_id}/setup`

The setup process creates all of the **tasks** within the batch according to your configuration.
Each datapoint in the dataset is paired with all instructions to create a task. Tasks are then organized into task groups.

**V3 datasets:** The dataset must be in a **READY** status before setup can be initiated.

**V4 datasets:** The dataset must have at least one import job with status **complete**. V4 datasets do not have a `READY` status — readiness is determined per import job via `GET /datasets/{dataset_id}/imports/{import_id}`.

The dataset can be attached either at batch creation time or via the `dataset_id` parameter in this request.

Upon successful invocation, the setup process will begin asynchronously, and the batch will be set to a **PROCESSING** status.

To retrieve the status of the setup, call the `GET /api/v1/data-collection/batches/{batch_id}/status` endpoint.
The setup is complete once the batch status changes to **READY**.

## Path parameters

- `batch_id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `dataset_id` string, uuid — The ID of the dataset to use for task generation. Optional if a dataset was already attached at batch creation time.
  - `tasks_per_group` integer — The number of tasks to randomly assign to each task group. Participants complete one task group per submission. If your dataset includes a META_TASK_GROUP_ID column, those groupings take precedence over this parameter.

## Response `202`

Accepted

- AITaskBuilderSetupTaskBuilderBatchResponse202 — Empty response body

## Other responses

- `400` — Error

---

[API](https://skmtc.net/prolific/apis/api-reference.md) · [All operations](https://skmtc.net/prolific/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prolific/api-reference/versions/dc6f073a9827/schema)
