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

# Update a Collection

PUT https://api.prolific.com/api/v1/data-collection/collections/{collection_id}
Content-Type: application/json

Update an existing 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.

Reference: https://docs.prolific.com/api-reference/task-builder/update-collection

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

### Path parameters

- `collection_id` (string, required)

### Body (application/json)

This endpoint expects a CollectionUpdateRequest.

- `name` (string, required) — The name of the collection
- `task_details` (TaskDetails, required) — Task metadata displayed to participants
- `collection_items` (list of CollectionItemInput, required) — Pages within the collection. Include `id` to preserve existing items.

## Response

### 200

OK

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

## Errors

### 400 Client Request Error

Error

- `error` (ErrorDetail, required)

## Types

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

### CollectionItemInput

A page within a collection. Include `id` to preserve an existing page when updating.

- `page_items` (list of PageItemInput, required) — Instructions and content blocks on this page
- `id` (string, optional) — Include to preserve an existing page when updating

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

### 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)

### PageItemInput

An instruction or content block input. Include `id` to preserve an existing item when updating.

- CollectionInstructionInput: CollectionInstructionInput
- ContentBlockInput: ContentBlockInput

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

### ErrorDetailDetail

Error detail

- string
- list of string
- ErrorDetailDetail2

### CollectionInstructionInput

Instruction input for a collection page

- `type` (enum, required)
  - Allowed values: `multiple_choice`, `free_text`, `free_text_with_unit`, `multiple_choice_with_free_text`, `file_upload`
- `description` (string, required) — The question or prompt displayed to participants
- `order` (integer, required) — Position of this instruction relative to others
- `id` (string, optional) — Include to preserve an existing instruction when updating
- `helper_text` (string, optional) — Additional guidance text displayed below the question
- `placeholder_text_input` (string, optional) — Placeholder text displayed in the input field
- `answer_limit` (integer, optional) — Number of options that can be selected. Use 1 for single-select, -1 for unlimited.
- `disable_dropdown` (boolean, optional, default: false) — When true, always renders checkbox/radio elements instead of a dropdown select.
- `options` (list of CollectionInstructionInputOptionsItems, optional)
- `unit_options` (list of CollectionInstructionInputUnitOptionsItems, optional) — Required for free_text_with_unit. List of available units that participants can select from.
- `default_unit` (string, optional) — For free_text_with_unit. Default selected unit (must match a value from unit_options).
- `unit_position` (enum, optional) — Required for free_text_with_unit. Position of the unit selector relative to the text input.
  - Allowed values: `prefix`, `suffix`
- `validation` (ValidationRule, optional) — Optional validation constraints for the input value (for free_text).

### ContentBlockInput

Content block input for a collection page

- `type` (enum, required)
  - Allowed values: `image`, `rich_text`
- `id` (string, optional) — Include to preserve an existing content block when updating
- `url` (string, optional) — HTTPS URL for image content blocks
- `alt_text` (string, optional) — Alt text for image content blocks (required for accessibility)
- `caption` (string, optional) — Optional caption for image content blocks
- `content` (string, optional) — Content for rich_text content blocks. Interpreted as HTML by default, or Markdown if content_format is set to "markdown".
- `content_format` (enum, optional, default: html) — Format of the content field. When set to "markdown", content is converted to HTML server-side before storage. Defaults to "html".
  - Allowed values: `html`, `markdown`

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

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

### CollectionInstructionInputOptionsItems

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

### CollectionInstructionInputUnitOptionsItems

- `label` (string, required)
- `value` (CollectionInstructionInputUnitOptionsItemsValue, required)
- `validation` (ValidationRule, optional) — Optional validation constraints for this unit option.

### CollectionMultipleChoiceInstructionOptionsItemsValue

- string
- double
- boolean

### CollectionFreeTextWithUnitInstructionUnitOptionsItemsValue

Value returned in responses

- string
- double
- boolean

### CollectionMultipleChoiceWithFreeTextInstructionOptionsItemsValue

- string
- double
- boolean

### CollectionInstructionInputOptionsItemsValue

- string
- double
- boolean

### CollectionInstructionInputUnitOptionsItemsValue

- string
- double
- boolean

## Examples

**Request**

```json
{
  "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",
          "description": "What is your skin type?",
          "order": 1,
          "answer_limit": 1,
          "options": [
            {
              "label": "Oily",
              "value": "oily"
            },
            {
              "label": "Dry",
              "value": "dry"
            },
            {
              "label": "Combination",
              "value": "combination"
            },
            {
              "label": "Normal",
              "value": "normal"
            }
          ]
        }
      ],
      "id": "01924850-9e29-744a-811c-b26612812345"
    }
  ]
}
```

**Response**

```json
{
  "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"
}
```

**SDK Code**

```python
import requests

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

payload = {
    "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",
                    "description": "What is your skin type?",
                    "order": 1,
                    "answer_limit": 1,
                    "options": [
                        {
                            "label": "Oily",
                            "value": "oily"
                        },
                        {
                            "label": "Dry",
                            "value": "dry"
                        },
                        {
                            "label": "Combination",
                            "value": "combination"
                        },
                        {
                            "label": "Normal",
                            "value": "normal"
                        }
                    ]
                }
            ],
            "id": "01924850-9e29-744a-811c-b26612812345"
        }
    ]
}
headers = {
    "Authorization": "Token <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/data-collection/collections/collection_id';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Token <token>', 'Content-Type': 'application/json'},
  body: '{"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","description":"What is your skin type?","order":1,"answer_limit":1,"options":[{"label":"Oily","value":"oily"},{"label":"Dry","value":"dry"},{"label":"Combination","value":"combination"},{"label":"Normal","value":"normal"}]}],"id":"01924850-9e29-744a-811c-b26612812345"}]}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"Updated Skin Type Assessment\",\n  \"task_details\": {\n    \"task_name\": \"Assess Your Skin Type\",\n    \"task_introduction\": \"<p>Please answer the following questions about your skin.</p>\",\n    \"task_steps\": \"<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>\"\n  },\n  \"collection_items\": [\n    {\n      \"page_items\": [\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812346\",\n          \"type\": \"rich_text\",\n          \"content\": \"## Section 1: Basic Information\"\n        },\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812347\",\n          \"type\": \"multiple_choice\",\n          \"description\": \"What is your skin type?\",\n          \"order\": 1,\n          \"answer_limit\": 1,\n          \"options\": [\n            {\n              \"label\": \"Oily\",\n              \"value\": \"oily\"\n            },\n            {\n              \"label\": \"Dry\",\n              \"value\": \"dry\"\n            },\n            {\n              \"label\": \"Combination\",\n              \"value\": \"combination\"\n            },\n            {\n              \"label\": \"Normal\",\n              \"value\": \"normal\"\n            }\n          ]\n        }\n      ],\n      \"id\": \"01924850-9e29-744a-811c-b26612812345\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Token <token>")
	req.Header.Add("Content-Type", "application/json")

	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/collection_id")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Token <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Updated Skin Type Assessment\",\n  \"task_details\": {\n    \"task_name\": \"Assess Your Skin Type\",\n    \"task_introduction\": \"<p>Please answer the following questions about your skin.</p>\",\n    \"task_steps\": \"<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>\"\n  },\n  \"collection_items\": [\n    {\n      \"page_items\": [\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812346\",\n          \"type\": \"rich_text\",\n          \"content\": \"## Section 1: Basic Information\"\n        },\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812347\",\n          \"type\": \"multiple_choice\",\n          \"description\": \"What is your skin type?\",\n          \"order\": 1,\n          \"answer_limit\": 1,\n          \"options\": [\n            {\n              \"label\": \"Oily\",\n              \"value\": \"oily\"\n            },\n            {\n              \"label\": \"Dry\",\n              \"value\": \"dry\"\n            },\n            {\n              \"label\": \"Combination\",\n              \"value\": \"combination\"\n            },\n            {\n              \"label\": \"Normal\",\n              \"value\": \"normal\"\n            }\n          ]\n        }\n      ],\n      \"id\": \"01924850-9e29-744a-811c-b26612812345\"\n    }\n  ]\n}"

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.put("https://api.prolific.com/api/v1/data-collection/collections/collection_id")
  .header("Authorization", "Token <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Updated Skin Type Assessment\",\n  \"task_details\": {\n    \"task_name\": \"Assess Your Skin Type\",\n    \"task_introduction\": \"<p>Please answer the following questions about your skin.</p>\",\n    \"task_steps\": \"<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>\"\n  },\n  \"collection_items\": [\n    {\n      \"page_items\": [\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812346\",\n          \"type\": \"rich_text\",\n          \"content\": \"## Section 1: Basic Information\"\n        },\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812347\",\n          \"type\": \"multiple_choice\",\n          \"description\": \"What is your skin type?\",\n          \"order\": 1,\n          \"answer_limit\": 1,\n          \"options\": [\n            {\n              \"label\": \"Oily\",\n              \"value\": \"oily\"\n            },\n            {\n              \"label\": \"Dry\",\n              \"value\": \"dry\"\n            },\n            {\n              \"label\": \"Combination\",\n              \"value\": \"combination\"\n            },\n            {\n              \"label\": \"Normal\",\n              \"value\": \"normal\"\n            }\n          ]\n        }\n      ],\n      \"id\": \"01924850-9e29-744a-811c-b26612812345\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.prolific.com/api/v1/data-collection/collections/collection_id', [
  'body' => '{
  "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",
          "description": "What is your skin type?",
          "order": 1,
          "answer_limit": 1,
          "options": [
            {
              "label": "Oily",
              "value": "oily"
            },
            {
              "label": "Dry",
              "value": "dry"
            },
            {
              "label": "Combination",
              "value": "combination"
            },
            {
              "label": "Normal",
              "value": "normal"
            }
          ]
        }
      ],
      "id": "01924850-9e29-744a-811c-b26612812345"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Token <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/data-collection/collections/collection_id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Token <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Updated Skin Type Assessment\",\n  \"task_details\": {\n    \"task_name\": \"Assess Your Skin Type\",\n    \"task_introduction\": \"<p>Please answer the following questions about your skin.</p>\",\n    \"task_steps\": \"<ol><li>Read each question carefully</li><li>Select the most accurate answer</li></ol>\"\n  },\n  \"collection_items\": [\n    {\n      \"page_items\": [\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812346\",\n          \"type\": \"rich_text\",\n          \"content\": \"## Section 1: Basic Information\"\n        },\n        {\n          \"id\": \"01924850-9e29-744a-811c-b26612812347\",\n          \"type\": \"multiple_choice\",\n          \"description\": \"What is your skin type?\",\n          \"order\": 1,\n          \"answer_limit\": 1,\n          \"options\": [\n            {\n              \"label\": \"Oily\",\n              \"value\": \"oily\"\n            },\n            {\n              \"label\": \"Dry\",\n              \"value\": \"dry\"\n            },\n            {\n              \"label\": \"Combination\",\n              \"value\": \"combination\"\n            },\n            {\n              \"label\": \"Normal\",\n              \"value\": \"normal\"\n            }\n          ]\n        }\n      ],\n      \"id\": \"01924850-9e29-744a-811c-b26612812345\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "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",
          "description": "What is your skin type?",
          "order": 1,
          "answer_limit": 1,
          "options": [
            [
              "label": "Oily",
              "value": "oily"
            ],
            [
              "label": "Dry",
              "value": "dry"
            ],
            [
              "label": "Combination",
              "value": "combination"
            ],
            [
              "label": "Normal",
              "value": "normal"
            ]
          ]
        ]
      ],
      "id": "01924850-9e29-744a-811c-b26612812345"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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

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()
```