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

Update Batch Instructions

|View as Markdown|Open in Claude|
PUT
https://api.prolific.com/api/v1/data-collection/batches/:batch_id/instructions
PUT
/api/v1/data-collection/batches/:batch_id/instructions
$curl -X PUT https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "instructions": [
> {
> "type": "multiple_choice",
> "description": "Choose the LLM response which is more accurate.",
> "id": "0192041c-470f-7336-8e3d-e03fc086a4e1",
> "answer_limit": 1,
> "options": [
> {
> "label": "Response 1",
> "value": "response1"
> },
> {
> "label": "Response 2",
> "value": "response2"
> }
> ]
> },
> {
> "type": "free_text",
> "description": "Please share the reasons for your choice.",
> "id": "0192041c-4710-7336-8e3d-e9b6149c0797"
> },
> {
> "type": "multiple_choice_with_free_text",
> "description": "Rate each aspect and explain your reasoning.",
> "answer_limit": -1,
> "options": [
> {
> "label": "Good",
> "value": "accuracy_good",
> "heading": "Accuracy"
> },
> {
> "label": "Needs improvement",
> "value": "accuracy_poor",
> "heading": "Accuracy"
> }
> ]
> },
> {
> "type": "free_text_with_unit",
> "description": "What is your height?",
> "unit_options": [
> {
> "label": "Centimeters",
> "value": "cm",
> "validation": {
> "type": "number",
> "min": 50,
> "max": 300
> }
> },
> {
> "label": "Feet",
> "value": "ft",
> "validation": {
> "type": "number",
> "min": 1,
> "max": 9
> }
> }
> ],
> "unit_position": "suffix"
> },
> {
> "type": "file_upload",
> "description": "Upload a photo of the item",
> "accepted_file_types": [
> ".jpg",
> ".jpeg",
> ".png"
> ],
> "max_file_size_mb": 10,
> "min_file_count": 1,
> "max_file_count": 3
> }
> ]
>}'
1[
2 {
3 "type": "multiple_choice",
4 "answer_limit": 1,
5 "created_at": "2024-09-18T07:50:15.055Z",
6 "created_by": "Sean",
7 "description": "Choose the LLM response which is more accurate.",
8 "id": "0192041c-470f-7336-8e3d-e03fc086a4e1",
9 "options": [
10 {
11 "label": "Response 1",
12 "value": "response1"
13 },
14 {
15 "label": "Response 2",
16 "value": "response2"
17 }
18 ],
19 "parent_id": "01974850-9e29-744a-811c-b26612812345",
20 "parent_type": "batch"
21 },
22 {
23 "type": "free_text",
24 "created_at": "2024-09-18T07:50:15.056Z",
25 "created_by": "Sean",
26 "description": "Please share the reasons for your choice.",
27 "id": "0192041c-4710-7336-8e3d-e9b6149c0797",
28 "parent_id": "01974850-9e29-744a-811c-b26612812345",
29 "parent_type": "batch"
30 },
31 {
32 "type": "multiple_choice_with_free_text",
33 "answer_limit": -1,
34 "created_at": "2024-09-18T07:50:15.057Z",
35 "created_by": "Sean",
36 "description": "Rate each aspect and explain your reasoning.",
37 "id": "0192041c-4712-7336-8e3d-a2b3c4d5e6f7",
38 "options": [
39 {
40 "label": "Good",
41 "value": "accuracy_good",
42 "heading": "Accuracy"
43 },
44 {
45 "label": "Needs improvement",
46 "value": "accuracy_poor",
47 "heading": "Accuracy"
48 }
49 ],
50 "parent_id": "01974850-9e29-744a-811c-b26612812345",
51 "parent_type": "batch"
52 },
53 {
54 "type": "free_text_with_unit",
55 "created_at": "2024-09-18T07:50:15.058Z",
56 "created_by": "Sean",
57 "description": "What is your height?",
58 "id": "0192041c-4713-7336-8e3d-b3c4d5e6f7a8",
59 "parent_id": "01974850-9e29-744a-811c-b26612812345",
60 "parent_type": "batch",
61 "unit_options": [
62 {
63 "label": "Centimeters",
64 "value": "cm",
65 "validation": {
66 "type": "number",
67 "min": 50,
68 "max": 300
69 }
70 },
71 {
72 "label": "Feet",
73 "value": "ft",
74 "validation": {
75 "type": "number",
76 "min": 1,
77 "max": 9
78 }
79 }
80 ],
81 "unit_position": "suffix"
82 },
83 {
84 "type": "file_upload",
85 "created_at": "2024-09-18T07:50:15.059Z",
86 "created_by": "Sean",
87 "description": "Upload a photo of the item",
88 "id": "0192041c-4711-7336-8e3d-f1c7260d1898",
89 "parent_id": "01974850-9e29-744a-811c-b26612812345",
90 "parent_type": "batch",
91 "accepted_file_types": [
92 ".jpg",
93 ".jpeg",
94 ".png"
95 ],
96 "max_file_count": 3,
97 "max_file_size_mb": 10,
98 "min_file_count": 1
99 }
100]

Updates the instructions for a task builder batch. This is a full replacement - all instructions must be included in the request.

Include the id field for existing instructions you want to preserve. Instructions without an id will be created as new.

Was this page helpful?
Previous

Create Batch Instructions

Next

List Collections

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
Batch ID

Request

This endpoint expects an object.
instructionslist of objectsRequired
The instructions for the batch.

Response

Updated
multiple_choiceobject
OR
free_textobject
OR
free_text_with_unitobject
OR
multiple_choice_with_free_textobject
OR
file_uploadobject

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