---
title: PUT tasks/{taks_id}/fields/{field_id}
slug: content-marketing-platform/api/put-taskstaksidfieldsfieldid
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "QRQ7djAzs_o2pcelHJxPJ",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "PUT tasks/{taks_id}/fields/{field_id}",
    "description": "<p>Experimental Update a field of a task.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "task_id",
          "type": "string",
          "example": "124p857f3i220y38ad6179e9",
          "description": "Unique identifier of the task"
        },
        {
          "kind": "required",
          "name": "field_id",
          "type": "string",
          "example": "124p857f3i220y38ad6179e9",
          "description": "Unique identifier of the field of the task"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Payload to update a field of a task",
          "discriminator": {
            "propertyName": "type",
            "mapping": {
              "checkbox": "#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload",
              "currency_number": "#/components/schemas/NumberTypeObjectFieldUpdatePayload",
              "date": "#/components/schemas/DateTypeObjectFieldUpdatePayload",
              "dropdown": "#/components/schemas/DropdownTypeObjectFieldUpdatePayload",
              "label": "#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload",
              "radio_button": "#/components/schemas/RadioButtonTypeObjectFieldUpdatePayload",
              "percentage_number": "#/components/schemas/NumberTypeObjectFieldUpdatePayload",
              "simple_number": "#/components/schemas/NumberTypeObjectFieldUpdatePayload",
              "text": "#/components/schemas/StringTypeObjectFieldUpdatePayload",
              "text_area": "#/components/schemas/StringTypeObjectFieldUpdatePayload",
              "rich_text": "#/components/schemas/StringTypeObjectFieldUpdatePayload",
              "image": "#/components/schemas/AssetTypeObjectFieldUpdatePayload",
              "video": "#/components/schemas/AssetTypeObjectFieldUpdatePayload"
            }
          },
          "customType": "TaskFieldUpdateRequest",
          "schema": [],
          "modelRef": "#/components/schemas/TaskFieldUpdateRequest",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "Any single string",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "This is a test string",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/StringTypeObjectFieldUpdatePayload",
              "customType": "StringTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "Array of choice IDs",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "9119a313057e401189407116fcd3",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/MultiChoiceTypeObjectFieldUpdatePayload",
              "customType": "MultiChoiceTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Array of choice ID. Multiple choice values are not acceptable for <code>is_multi_select=false</code>.</p>",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "9119a313057e401189407116fcd3",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/DropdownTypeObjectFieldUpdatePayload",
              "customType": "DropdownTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "Accepts a single choice Id.",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "9119a313057e401189407116fcd3",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/RadioButtonTypeObjectFieldUpdatePayload",
              "customType": "RadioButtonTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "Accepts a single numeric value",
                  "example": "",
                  "itemType": "number",
                  "customType": "number[]",
                  "itemExample": 200,
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/NumberTypeObjectFieldUpdatePayload",
              "customType": "NumberTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "<p>Array of date-time values, in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>)<p></p>",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "2020-02-10T10:40:45Z",
                  "itemDefault": ""
                }
              ],
              "modelRef": "#/components/schemas/DateTypeObjectFieldUpdatePayload",
              "customType": "DateTypeObjectFieldUpdatePayload"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Type of the field",
                  "example": "checkbox"
                },
                {
                  "name": "values",
                  "kind": "required",
                  "type": "array",
                  "description": "Values for the campaign field",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "values",
                  "kind": "optional",
                  "type": "array",
                  "description": "Payload for fields with attachments",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "title",
                      "kind": "required",
                      "type": "string",
                      "description": "Title of the image or video",
                      "example": "Sample.jpeg",
                      "minLength": 1
                    },
                    {
                      "name": "key",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Unique identifier of the file upload session. This is the <code>upload_meta_fields.key</code> field retrieved from the <code>/v3/upload-url</code> endpoint.</p>",
                      "example": "ce8995aea58b11ea8cd90242ac120005"
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/AssetTypeObjectFieldUpdatePayload",
              "customType": "AssetTypeObjectFieldUpdatePayload"
            }
          ],
          "complexType": "oneOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "The field of the task was updated.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Client error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unsupported arguments: a,b,c\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource not found\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable entity error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource cannot be processed\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "z3vVm9xY9vtRY5Q5y3_y9",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"type\": \"checkbox\",\n     \"values\": []\n     }'"
        },
        {
          "id": "irX6aF7yvFjZND6Morn01",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"type\": \"checkbox\",\n   \"values\": []\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "F2v88h120p4_cxyaBLgTx",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"type\": \"checkbox\",\n   \"values\": []\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_14J5ErGqNQ6mx-xCsedV",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/tasks/{task_id}/fields/{field_id}\"\n\npayload = json.dumps({\n   \"type\": \"checkbox\",\n   \"values\": []\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "z3vVm9xY9vtRY5Q5y3_y9"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-204",
          "language": "204",
          "code": "// The field of the task was updated.\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-5-422",
          "language": "422",
          "code": "// Unprocessable entity error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-204"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}