For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Go to app
DocumentationAPI Reference
DocumentationAPI Reference
  • API Reference
    • Introduction
    • Users
    • Taskflow
    • AI Task Builder
      • Batches
      • Exporting Batch Data
      • Collections
      • Exporting Collection Data
      • Datasets
      • Instructions
      • GETList Batches
      • POSTCreate a Batch
      • GETGet a Batch
      • PATCHUpdate a Batch
      • GETGet Batch Status
      • POSTSetup a Batch
      • GETGet Batch Responses
      • GETGet Batch Report
      • POSTDuplicate a Batch
      • POSTRequest a Batch Export
      • GETGet Batch Export Status
      • POSTCreate a Dataset
      • GETGet Dataset Upload URL
      • GETGet Dataset Status
      • GETGet Batch Instructions
      • POSTCreate Batch Instructions
      • PUTUpdate Batch Instructions
      • GETList Collections
      • POSTCreate a Collection
      • GETGet a Collection
      • PUTUpdate a Collection
      • GETGet Collection Responses
      • POSTRequest a Collection Export
      • GETGet Collection Export Status
    • Studies
    • Representative sample studies
    • study-collections
    • Filter Sets
    • Participant Groups
    • Custom Groups
    • Study Distribution
    • Submissions
    • Bonuses
    • Messages
    • Workspaces
    • Projects
    • Surveys
    • Webhooks
    • Invitations
    • Reward Recommendations
    • Testing
    • Well Known Endpoints
Go to app
LogoLogo
API ReferenceAI Task Builder

Create a Batch

|View as Markdown|Open in Claude|
POST
https://api.prolific.com/api/v1/data-collection/batches
POST
/api/v1/data-collection/batches
$curl -X POST https://api.prolific.com/api/v1/data-collection/batches \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Sentiment Analysis Batch",
> "workspace_id": "6278acb09062db3b35bcbeb0",
> "task_details": {
> "task_name": "Evaluate Product Reviews",
> "task_introduction": "<p>In this task, you will analyze product reviews and categorize their sentiment.</p>",
> "task_steps": "<ol><li>Read each review carefully</li><li>Select the appropriate sentiment</li><li>Provide a brief explanation</li></ol>"
> },
> "dataset_id": "1234acb09999db4b99bcded1"
>}'
Create a new AI Task Builder batch. The dataset does not need to be in READY status at creation time.
Was this page helpful?
Previous

List Batches

Next

Get a Batch

Authentication

AuthorizationToken
The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings. Your API token does not have an expiry date and carries full permission, so be sure to keep them secure. If your token is leaked, delete it and create a new one directly in the app. In your requests add `Authorization` header with the value `Token <your token>`.

Request

This endpoint expects an object.
namestringRequired
The name of the batch
workspace_idstringRequired
The ID of the Prolific workspace
task_detailsobjectRequired
Task metadata displayed to participants
dataset_idstringOptional

The ID of the dataset to attach (optional at creation time)

Response

Created
idstringformat: "uuid"
created_atdatetime

An ISO-8601 formatted string representing the batch creation time, in UTC.

created_bystring
User ID of the Prolific user that created the resource.
datasetslist of objects
namestring
statusenum
Allowed values:
total_task_countinteger>=0
total_instruction_countinteger>=0
workspace_idstring
task_detailsobject

Errors

4XX
Client Request Error

The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings.

Your API token does not have an expiry date and carries full permission, so be sure to keep them secure.

If your token is leaked, delete it and create a new one directly in the app.

In your requests add Authorization header with the value Token <your token>.