---
title: PATCH /tasks/{task_id}/steps/{step_id}
slug: content-marketing-platform/api/patch-taskstaskidstepsstepid
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "PMhvOogwtJwFtWtXufh72",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "PATCH /tasks/{task_id}/steps/{step_id}",
    "description": "<p>Experimental Update a step in a task</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "task_id",
          "type": "string",
          "example": "7d7f910551b00a722e0418830cee6612",
          "description": "Unique identifier of the task"
        },
        {
          "kind": "required",
          "name": "step_id",
          "type": "string",
          "example": "897f910551b00a722e0418830cee6612",
          "description": "Unique identifier of the step"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "example": "{\"due_at\":\"2025-10-06T13:00:00Z\"}",
          "examples": [
            {
              "label": "Update the due date of the step",
              "value": "{\"due_at\":\"2025-10-06T13:00:00Z\"}"
            }
          ],
          "description": "Payload to update the step",
          "customType": "TaskStepRequest",
          "schema": [
            {
              "name": "due_at",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": false,
              "description": "<p>Due date and time of the task step, in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>). Point to note: in the CMP web interface, a popup is shown while updating a step's due date to inform the user of temporal or sequential constraints based on the due date of other steps. However, this API will update the step's due date while superceding any validation for the workflow.<p></p>",
              "example": "2025-10-06T13:00:00Z",
              "format": "date-time"
            }
          ],
          "modelRef": "#/components/schemas/TaskStepRequest",
          "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": "200",
        "description": "The updated step object",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TaskStep",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier of the step",
                "example": "6d7f910551b00a722e0418830cee5564"
              },
              {
                "name": "title",
                "kind": "required",
                "type": "string",
                "description": "Title of the step",
                "example": "Sample step"
              },
              {
                "name": "is_completed",
                "kind": "required",
                "type": "boolean",
                "description": "Determines whether the step is completed in Optimizely CMP",
                "example": false
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Description of the step",
                "example": "Description of the step"
              },
              {
                "name": "due_at",
                "kind": "required",
                "type": "string<date-time>",
                "nullable": true,
                "description": "<p>Due date and time of the step containing the substep,  in ISO 8601 UTC format (2020-02-10T10:40</p><div></div>)<p></p>",
                "example": "2020-10-06T13:15:30Z",
                "format": "date-time"
              },
              {
                "name": "sub_steps",
                "kind": "required",
                "type": "array",
                "description": "Substeps of the step",
                "modelRef": "#/components/schemas/TaskSubStep",
                "customType": "TaskSubStep[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier of the substep",
                    "example": "9c7f910551b00a722e0418830cee2564"
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "description": "Title of the substep",
                    "example": "Sample step"
                  },
                  {
                    "name": "assignee_id",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "ID of the assignee of the step containing the substep",
                    "example": "5fdf31d57f0d0e362e2b5908"
                  },
                  {
                    "name": "assignee_type",
                    "kind": "required",
                    "type": "string<user | team>",
                    "description": "Type of the assignee of the step containing the substep.",
                    "example": "user",
                    "enum": [
                      "user",
                      "team"
                    ]
                  },
                  {
                    "name": "is_completed",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Determines whether the substep is completed in Optimizely CMP",
                    "example": false
                  },
                  {
                    "name": "is_in_progress",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Determines whether the substep is In Progress in Optimizely CMP",
                    "example": false
                  },
                  {
                    "name": "is_skipped",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Determines whether the substep is skipped in Optimizely CMP",
                    "example": false
                  },
                  {
                    "name": "is_external",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Determines whether the substep is external in Optimizely CMP",
                    "example": true
                  },
                  {
                    "name": "links",
                    "kind": "required",
                    "type": "object",
                    "description": "Meta links",
                    "example": "",
                    "schema": [
                      {
                        "name": "self",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the substep",
                        "example": "https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534/steps/6d7f910551b00a722e0418830cee5564/sub-steps/9c7f910551b00a722e0418830cee2564"
                      },
                      {
                        "name": "task",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the task",
                        "example": "https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534"
                      },
                      {
                        "name": "external_work",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "<p>URL of the external work associated with substep if substep is external in <em>Optimizely CMP</em></p>",
                        "example": "https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534/steps/6d7f910551b00a722e0418830cee5564/sub-steps/9c7f910551b00a722e0418830cee2564/external-work"
                      },
                      {
                        "name": "assignee",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Assignee of the step containing the substep",
                        "example": "https://api.cmp.optimizely.com/v3/users/5fdf31d57f0d0e362e2b5908"
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/TaskStep",
            "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": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PATCH\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The updated step object\n{\n  \"id\": \"6d7f910551b00a722e0418830cee5564\",\n  \"title\": \"Sample step\",\n  \"is_completed\": false,\n  \"description\": \"Description of the step\",\n  \"due_at\": \"2020-10-06T13:15:30Z\",\n  \"sub_steps\": [\n    {\n      \"id\": \"9c7f910551b00a722e0418830cee2564\",\n      \"title\": \"Sample step\",\n      \"assignee_id\": \"5fdf31d57f0d0e362e2b5908\",\n      \"assignee_type\": \"user\",\n      \"is_completed\": false,\n      \"is_in_progress\": false,\n      \"is_skipped\": false,\n      \"is_external\": true,\n      \"links\": {\n        \"self\": \"https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534/steps/6d7f910551b00a722e0418830cee5564/sub-steps/9c7f910551b00a722e0418830cee2564\",\n        \"task\": \"https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534\",\n        \"external_work\": \"https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee5534/steps/6d7f910551b00a722e0418830cee5564/sub-steps/9c7f910551b00a722e0418830cee2564/external-work\",\n        \"assignee\": \"https://api.cmp.optimizely.com/v3/users/5fdf31d57f0d0e362e2b5908\"\n      }\n    }\n  ]\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-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}