---
title: PATCH /tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work
slug: content-marketing-platform/api/patch-taskstaskidstepsstepidsub-stepssubstepidexternal-work
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "shloyPtANVyXaQyV3kV5_",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "PATCH /tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work",
    "description": "Update the external work information of a task external substep",
    "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"
        },
        {
          "kind": "required",
          "name": "sub_step_id",
          "type": "string",
          "example": "700f910551b00a722e0418830cee6612",
          "description": "Unique identifier of the substep"
        }
      ],
      "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",
          "description": "Payload to update the external work information",
          "customType": "TaskExternalWorkRequest",
          "schema": [
            {
              "name": "identifier",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Identifier of the external work",
              "example": "MY-PROJ-123",
              "minLength": 1,
              "maxLength": 50
            },
            {
              "name": "title",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Title of the external work",
              "example": "A very important ticket",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "name": "status",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Status of the external work",
              "example": "In Progress",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "name": "url",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "<p>Link to the external work (must be a valid URL with HTTPS scheme)</p>",
              "example": "https://example.com/some-project/MY-PROJ-123",
              "maxLength": 500
            }
          ],
          "modelRef": "#/components/schemas/TaskExternalWorkRequest",
          "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": "Updated external work information",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TaskExternalWorkResponse",
            "schema": [
              {
                "name": "identifier",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Identifier of the external work",
                "example": "MY-PROJ-123"
              },
              {
                "name": "title",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Title of the external work",
                "example": "A very important ticket"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Status of the external work",
                "example": "In Progress"
              },
              {
                "name": "url",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Link to the external work",
                "example": "https://example.com/some-project/MY-PROJ-123"
              },
              {
                "name": "external_system",
                "kind": "required",
                "type": "string",
                "description": "Name of the external system",
                "example": "jira"
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "Meta links",
                "example": "",
                "schema": [
                  {
                    "name": "self",
                    "kind": "required",
                    "type": "string",
                    "description": "URL to get or update the external work information",
                    "example": "https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee6631/steps/32982hf94j98cnr48034nv035/sub-steps/9n390809r384nv503459075034nv5/external-work"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/TaskExternalWorkResponse",
            "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": "Qaycpe14BHMJ1e9qBwwS2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work \\\n     --header 'accept: application/json'"
        },
        {
          "id": "eAufOh94zgo4Q8i4u84w2",
          "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}/sub-steps/{sub_step_id}/external-work\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "oXuJR0lYPs_q6hOt2CAmH",
          "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}/sub-steps/{sub_step_id}/external-work\")\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": "V-tOcOomJAcTXjF8dwVIM",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/tasks/{task_id}/steps/{step_id}/sub-steps/{sub_step_id}/external-work\"\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": "Qaycpe14BHMJ1e9qBwwS2"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Updated external work information\n{\n  \"identifier\": \"MY-PROJ-123\",\n  \"title\": \"A very important ticket\",\n  \"status\": \"In Progress\",\n  \"url\": \"https://example.com/some-project/MY-PROJ-123\",\n  \"external_system\": \"jira\",\n  \"links\": {\n    \"self\": \"https://api.cmp.optimizely.com/v3/tasks/5d7f910551b00a722e0418830cee6631/steps/32982hf94j98cnr48034nv035/sub-steps/9n390809r384nv503459075034nv5/external-work\"\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": ""
    }
  ]
}