> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.prolific.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.prolific.com/_mcp/server.

# List Collections

GET https://api.prolific.com/api/v1/data-collection/collections

Get all Task Builder Collections for a workspace.

Reference: https://docs.prolific.com/api-reference/task-builder/list-collections

## Authentication

- `Authorization` header (required) (prefixed with ` Token  `) — 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

### Query parameters

- `workspace_id` (string, required) — The unique identifier of the workspace

## Response

### 200

OK

- `results` (list of Collection, optional)
- `meta` (ApiV1DataCollectionCollectionsGetResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 400 Client Request Error

Error

- `error` (ErrorDetail, required)

## Types

### Collection

- `id` (string, required)
- `schema_version` (enum, required)
  - Allowed values: `1`
- `created_at` (datetime, required) — ISO-8601 formatted creation timestamp in UTC
- `created_by` (string, required) — User ID of the Prolific user that created the collection
- `workspace_id` (string, required) — The ID of the Prolific workspace
- `name` (string, required) — The name of the collection
- `task_details` (TaskDetails, required) — Task metadata displayed to participants
- `collection_items` (list of CollectionItem, required) — Pages within the collection. Each collection item represents a page.
- `last_modified_at` (datetime, optional) — ISO-8601 formatted last modification timestamp in UTC
- `last_modified_by` (string, optional) — User ID of the Prolific user that last modified the collection

### ApiV1DataCollectionCollectionsGetResponsesContentApplicationJsonSchemaMeta

- `count` (integer, optional) — Total number of collections

### ErrorDetail

- `status` (integer, required) — Status code as in the http standards
- `error_code` (integer, required) — Internal error code
- `title` (string, required) — Error title
- `detail` (ErrorDetailDetail, required) — Error detail
- `additional_information` (string, optional) — Optional extra information
- `traceback` (string, optional) — Optional debug information
- `interactive` (boolean, optional)

### TaskDetails

Task metadata displayed to participants

- `task_name` (string, required) — The title displayed to participants
- `task_introduction` (string, required) — HTML formatted introduction shown at the start of the task
- `task_steps` (string, required) — HTML formatted step-by-step instructions

### CollectionItem

A page within a collection containing instructions and content blocks

- `id` (string, required)
- `created_at` (datetime, required)
- `created_by` (string, required)
- `schema_version` (enum, required)
  - Allowed values: `1`
- `page_items` (list of PageItem, required) — Instructions and content blocks on this page

### ErrorDetailDetail

Error detail

- string
- list of string
- ErrorDetailDetail2

### PageItem

An instruction or content block within a page

- `type`: `multiple_choice` (multiple_choice)
  - `answer_limit` (integer, required)
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `description` (string, required)
  - `id` (string, required)
  - `options` (list of CollectionMultipleChoiceInstructionOptionsItems, required)
  - `order` (integer, required)
  - `parent_id` (string, required) — ID of the parent batch or collection
  - `parent_type` (enum, required)
    - Allowed values: `batch`, `collection`
  - `disable_dropdown` (boolean, optional, default: false)
  - `helper_text` (string, optional) — Additional guidance text displayed below the question
  - `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
- `type`: `free_text` (free_text)
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `description` (string, required)
  - `id` (string, required)
  - `order` (integer, required)
  - `parent_id` (string, required) — ID of the parent batch or collection
  - `parent_type` (enum, required)
    - Allowed values: `batch`, `collection`
  - `helper_text` (string, optional) — Additional guidance text displayed below the question
  - `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
  - `validation` (ValidationRule, optional) — Optional validation constraints for the input value
- `type`: `free_text_with_unit` (free_text_with_unit)
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `description` (string, required)
  - `id` (string, required)
  - `order` (integer, required)
  - `parent_id` (string, required) — ID of the parent batch or collection
  - `parent_type` (enum, required)
    - Allowed values: `batch`, `collection`
  - `unit_options` (list of CollectionFreeTextWithUnitInstructionUnitOptionsItems, required) — List of available units that participants can select from
  - `unit_position` (enum, required) — Position of the unit selector relative to the text input. Use 'prefix' for units before the input (e.g., currency symbols) or 'suffix' for units after the input (e.g., measurements).
    - Allowed values: `prefix`, `suffix`
  - `default_unit` (string, optional) — Default selected unit (must match a value from unit_options)
  - `helper_text` (string, optional) — Additional guidance text displayed below the question
  - `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
- `type`: `multiple_choice_with_free_text` (multiple_choice_with_free_text)
  - `answer_limit` (integer, required)
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `description` (string, required)
  - `id` (string, required)
  - `options` (list of CollectionMultipleChoiceWithFreeTextInstructionOptionsItems, required)
  - `order` (integer, required)
  - `parent_id` (string, required) — ID of the parent batch or collection
  - `parent_type` (enum, required)
    - Allowed values: `batch`, `collection`
  - `disable_dropdown` (boolean, optional, default: false)
  - `helper_text` (string, optional) — Additional guidance text displayed below the question
  - `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
- `type`: `file_upload` (file_upload)
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `description` (string, required)
  - `id` (string, required)
  - `order` (integer, required)
  - `parent_id` (string, required) — ID of the parent batch or collection
  - `parent_type` (enum, required)
    - Allowed values: `batch`, `collection`
  - `accepted_file_types` (list of string, optional) — File extensions to accept (e.g., [".jpg", ".png", ".pdf"]). Each extension must start with a dot. Defaults to [".jpg", ".jpeg", ".png", ".heic", ".heif"] if not specified.
  - `helper_text` (string, optional) — Additional guidance text displayed below the question
  - `max_file_count` (integer, optional) — Maximum number of files allowed. Must be at least 1 and greater than or equal to min_file_count. Defaults to 10.
  - `max_file_size_mb` (double, optional) — Maximum file size in megabytes per file. Must be a positive number. Defaults to 25.
  - `min_file_count` (integer, optional) — Minimum number of files required. Must be at least 1. Defaults to 1.
  - `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
- `type`: `image` (image)
  - `alt_text` (string, required) — Alt text for accessibility
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `id` (string, required)
  - `parent_id` (string, required) — ID of the parent collection item (page)
  - `parent_type` (enum, required)
    - Allowed values: `collection`, `batch`
  - `schema_version` (enum, required)
    - Allowed values: `1`
  - `url` (string, required) — HTTPS URL of the image
  - `caption` (string, optional) — Optional caption displayed below the image
- `type`: `rich_text` (rich_text)
  - `content` (string, required) — HTML content. If the original input used Markdown, it has been converted to HTML.
  - `created_at` (datetime, required)
  - `created_by` (string, required)
  - `id` (string, required)
  - `parent_id` (string, required) — ID of the parent collection item (page)
  - `parent_type` (enum, required)
    - Allowed values: `collection`, `batch`
  - `schema_version` (enum, required)
    - Allowed values: `1`

### ErrorDetailDetail2

All fields with validation errors

- `any_field` (list of string, optional) — Name of the field with a validation error and as a value an array with the error descriptions

### CollectionMultipleChoiceInstructionOptionsItems

- `label` (string, required)
- `value` (CollectionMultipleChoiceInstructionOptionsItemsValue, required)
- `exclusive` (boolean, optional) — When true, selecting this option deselects all other options. Useful for "None of the above" style options.

### ValidationRule

Optional validation constraints for input values

- `type` (enum, required) — The expected input type. When "number", the input must be numeric and min/max constrain the numeric value. When "string", the input is treated as text and min/max constrain the character count.
  - Allowed values: `number`, `string`
- `min` (double, optional, nullable) — Minimum value (for type "number") or minimum character count (for type "string"). Null means unbounded. When type is "string", must be a non-negative integer. If both min and max are provided, min must be less than or equal to max.
- `max` (double, optional, nullable) — Maximum value (for type "number") or maximum character count (for type "string"). Null means unbounded. When type is "string", must be a non-negative integer. If both min and max are provided, max must be greater than or equal to min.

### CollectionFreeTextWithUnitInstructionUnitOptionsItems

- `label` (string, required) — Display text shown to participants
- `value` (CollectionFreeTextWithUnitInstructionUnitOptionsItemsValue, required) — Value returned in responses
- `validation` (ValidationRule, optional) — Optional validation constraints for this unit option

### CollectionMultipleChoiceWithFreeTextInstructionOptionsItems

- `label` (string, required)
- `value` (CollectionMultipleChoiceWithFreeTextInstructionOptionsItemsValue, required)
- `heading` (string, required)
- `exclusive` (boolean, optional) — When true, selecting this option deselects all other options. Useful for "None of the above" style options.

### CollectionMultipleChoiceInstructionOptionsItemsValue

- string
- double
- boolean

### CollectionFreeTextWithUnitInstructionUnitOptionsItemsValue

Value returned in responses

- string
- double
- boolean

### CollectionMultipleChoiceWithFreeTextInstructionOptionsItemsValue

- string
- double
- boolean

## Examples

**Response**

```json
{
  "results": [
    {
      "id": "string",
      "schema_version": 1,
      "created_at": "2024-01-15T09:30:00Z",
      "created_by": "string",
      "workspace_id": "string",
      "name": "string",
      "task_details": {
        "task_name": "string",
        "task_introduction": "string",
        "task_steps": "string"
      },
      "collection_items": [
        {
          "id": "string",
          "created_at": "2024-01-15T09:30:00Z",
          "created_by": "string",
          "schema_version": 1,
          "page_items": [
            {
              "type": "multiple_choice",
              "answer_limit": 1,
              "created_at": "2024-01-15T09:30:00Z",
              "created_by": "string",
              "description": "string",
              "id": "string",
              "options": [
                {
                  "label": "string",
                  "value": "string",
                  "exclusive": true
                }
              ],
              "order": 1,
              "parent_id": "string",
              "parent_type": "batch",
              "disable_dropdown": false,
              "helper_text": "string",
              "placeholder_text_input": "string"
            }
          ]
        }
      ],
      "last_modified_at": "2024-01-15T09:30:00Z",
      "last_modified_by": "string"
    }
  ],
  "meta": {
    "count": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.prolific.com/api/v1/data-collection/collections"

querystring = {"workspace_id":"workspace_id"}

headers = {"Authorization": "Token <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id';
const options = {method: 'GET', headers: {Authorization: 'Token <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Token <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id")
  .header("Authorization", "Token <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id', [
  'headers' => [
    'Authorization' => 'Token <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Token <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/data-collection/collections?workspace_id=workspace_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```