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 a Collection

|View as Markdown|Open in Claude|
PUT
https://api.prolific.com/api/v1/data-collection/collections/:collection_id
PUT
/api/v1/data-collection/collections/:collection_id
$curl -X PUT https://api.prolific.com/api/v1/data-collection/collections/collection_id \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Updated Skin Type Assessment",
> "task_details": {
> "task_name": "Assess Your Skin Type",
> "task_introduction": "<p>Please answer the following questions about your skin.</p>",
> "task_steps": "<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>"
> },
> "collection_items": [
> {
> "page_items": [
> {
> "id": "01924850-9e29-744a-811c-b26612812346",
> "type": "rich_text",
> "content": "## Section 1: Basic Information"
> },
> {
> "id": "01924850-9e29-744a-811c-b26612812347",
> "type": "multiple_choice",
> "content": "What is your skin type?"
> }
> ],
> "id": "01924850-9e29-744a-811c-b26612812345"
> }
> ]
>}'
1{
2 "id": "a3f1c2d4-5678-4e9b-9f12-3456789abcde",
3 "schema_version": 1,
4 "created_at": "2024-01-15T09:30:00Z",
5 "created_by": "user_12345",
6 "workspace_id": "workspace_67890",
7 "name": "Updated Skin Type Assessment",
8 "task_details": {
9 "task_name": "Assess Your Skin Type",
10 "task_introduction": "<p>Please answer the following questions about your skin.</p>",
11 "task_steps": "<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>"
12 },
13 "collection_items": [
14 {
15 "id": "01924850-9e29-744a-811c-b26612812345",
16 "created_at": "2024-01-10T08:00:00Z",
17 "created_by": "user_12345",
18 "schema_version": 1,
19 "page_items": [
20 {
21 "type": "multiple_choice",
22 "answer_limit": 1,
23 "created_at": "2024-01-10T08:05:00Z",
24 "created_by": "user_12345",
25 "description": "What is your skin type?",
26 "id": "01924850-9e29-744a-811c-b26612812347",
27 "options": [
28 {
29 "label": "Oily",
30 "value": "oily",
31 "exclusive": false
32 },
33 {
34 "label": "Dry",
35 "value": "dry",
36 "exclusive": false
37 },
38 {
39 "label": "Combination",
40 "value": "combination",
41 "exclusive": false
42 },
43 {
44 "label": "Normal",
45 "value": "normal",
46 "exclusive": false
47 }
48 ],
49 "order": 1,
50 "parent_id": "01924850-9e29-744a-811c-b26612812345",
51 "parent_type": "collection",
52 "disable_dropdown": false,
53 "helper_text": "Choose the option that best describes your skin.",
54 "placeholder_text_input": "Select one"
55 },
56 {
57 "type": "rich_text",
58 "created_at": "2024-01-10T08:02:00Z",
59 "created_by": "user_12345",
60 "id": "01924850-9e29-744a-811c-b26612812346",
61 "parent_id": "01924850-9e29-744a-811c-b26612812345",
62 "parent_type": "collection",
63 "description": "Section header",
64 "order": 0,
65 "helper_text": "",
66 "placeholder_text_input": "",
67 "answer_limit": 0,
68 "disable_dropdown": false,
69 "options": []
70 }
71 ]
72 }
73 ],
74 "last_modified_at": "2024-01-15T09:30:00Z",
75 "last_modified_by": "user_12345"
76}

Update an existing AI Task Builder Collection. This is a full replacement — all fields must be provided.

To preserve existing entities (collection items, page items) when updating, include their id fields in the request. Entities without IDs will be created as new, and existing entities not included in the request will be deleted.

Was this page helpful?
Previous

Get a Collection

Next

Get Collection Responses

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

collection_idstringRequired

Request

This endpoint expects an object.
namestringRequired
The name of the collection
task_detailsobjectRequired
Task metadata displayed to participants
collection_itemslist of objectsRequired

Pages within the collection. Include id to preserve existing items.

Response

OK
idstringformat: "uuid"
schema_versionenum
Allowed values:
created_atdatetime

ISO-8601 formatted creation timestamp in UTC

created_bystring
User ID of the Prolific user that created the collection
workspace_idstring
The ID of the Prolific workspace
namestring
The name of the collection
task_detailsobject
Task metadata displayed to participants
collection_itemslist of objects
Pages within the collection. Each collection item represents a page.
last_modified_atdatetime

ISO-8601 formatted last modification timestamp in UTC

last_modified_bystring
User ID of the Prolific user that last modified the collection

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