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
    • 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

Update a Batch

|View as Markdown|Open in Claude|
PATCH
https://api.prolific.com/api/v1/data-collection/batches/:batch_id
PATCH
/api/v1/data-collection/batches/:batch_id
$curl -X PATCH https://api.prolific.com/api/v1/data-collection/batches/batch_id \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "a3f1c2d4-5678-4e9b-9f12-3456789abcde",
3 "created_at": "2024-01-15T09:30:00Z",
4 "created_by": "6278cb09062dbb35bc4abebc",
5 "datasets": [
6 {
7 "id": "b7e9f1a2-3456-4cde-8f90-123456789abc",
8 "total_datapoint_count": 1500,
9 "filename": "customer_feedback_2024.csv"
10 }
11 ],
12 "name": "Data Collection Batch",
13 "status": "UNINITIALISED",
14 "total_task_count": 25,
15 "total_instruction_count": 5,
16 "workspace_id": "6278acb09062db3b35bcbeb0",
17 "schema_version": 1,
18 "task_details": {
19 "task_name": "Sentiment Analysis Task",
20 "task_introduction": "<p>Welcome to the sentiment analysis task. Your goal is to classify customer feedback as positive, neutral, or negative.</p>",
21 "task_steps": "<ol><li>Read the feedback carefully.</li><li>Select the sentiment category that best fits the feedback.</li><li>Submit your classification.</li></ol>"
22 },
23 "total_task_groups": 3
24}

Update an existing AI Task Builder batch. You can update the name, task details, and/or associated dataset. The dataset does not need to be in READY status for updates.

Was this page helpful?
Previous

Get a Batch

Next

Get Batch Status

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

Path parameters

batch_idstringRequired
The unique identifier of the batch

Request

This endpoint expects an object.
namestringOptional
task_detailsobjectOptional
dataset_idstringOptionalformat: "uuid"

Response

Ok
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
schema_versioninteger
task_detailsobject
total_task_groupsinteger>=0

Errors

400
Bad Request Error
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>.