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 Collection

|View as Markdown|Open in Claude|
POST
https://api.prolific.com/api/v1/data-collection/collections
POST
/api/v1/data-collection/collections
$curl -X POST https://api.prolific.com/api/v1/data-collection/collections \
> -H "Authorization: Token <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Skin Type Assessment",
> "workspace_id": "6278acb09062db3b35bcbeb0",
> "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": [
> {
> "type": "rich_text",
> "content": "## Section 1: Basic Information"
> },
> {
> "type": "multiple_choice",
> "content": "What is your skin type?"
> }
> ]
> }
> ]
>}'
1{
2 "id": "a3f1c2d4-5678-4e9a-b123-456789abcdef",
3 "schema_version": 1,
4 "created_at": "2024-01-15T09:30:00Z",
5 "created_by": "user_987654321",
6 "workspace_id": "6278acb09062db3b35bcbeb0",
7 "name": "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": "b4d2e3f5-6789-4abc-c234-56789abcdef0",
16 "created_at": "2024-01-15T09:30:00Z",
17 "created_by": "user_987654321",
18 "schema_version": 1,
19 "page_items": [
20 {
21 "type": "multiple_choice",
22 "answer_limit": 1,
23 "created_at": "2024-01-15T09:30:00Z",
24 "created_by": "user_987654321",
25 "description": "What is your skin type?",
26 "id": "c5e3f4a6-7890-4bcd-d345-6789abcdef01",
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 "order": 1,
45 "parent_id": "b4d2e3f5-6789-4abc-c234-56789abcdef0",
46 "parent_type": "collection",
47 "disable_dropdown": false,
48 "helper_text": "Choose the option that best describes your skin.",
49 "placeholder_text_input": ""
50 }
51 ]
52 }
53 ],
54 "last_modified_at": "2024-01-15T09:30:00Z",
55 "last_modified_by": "user_987654321"
56}

Create a new AI Task Builder Collection. Collections allow you to define static content and instructions without requiring a dataset upload.

Unlike Batches, Collections do not require a dataset or setup step — they can be published to a study immediately after creation.

Was this page helpful?
Previous

List Collections

Next

Get a Collection

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 collection
workspace_idstringRequired
The ID of the Prolific workspace
task_detailsobjectRequired
Task metadata displayed to participants
collection_itemslist of objectsRequired
Pages within the collection

Response

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