---
title: Update request phase
slug: mihai-tests/update-request-phase
createdAt: 2025-01-22T07:25:18.837Z
---

{
  "id": "H0TkRPgux91Bu7k83pW2N",
  "type": "api-oas-v2",
  "data": {
    "method": "PATCH",
    "url": "/v1/request-phases/{requestPhaseId}",
    "servers": [],
    "name": "Update request phase",
    "description": "Update name and configuration of a phase",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "requestPhaseId",
          "type": "string<uuid>",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Phase to update. Configuration should correspond to the type of the phase",
          "customType": "PublicUpdateRequestPhaseDto",
          "schema": [
            {
              "name": "config",
              "kind": "optional",
              "type": "object",
              "description": "",
              "modelRef": "#/components/schemas/PublicPhaseConfigDto",
              "customType": "PublicPhaseConfigDto",
              "schema": [],
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "AnnotatePhaseConfigDto",
                  "description": "",
                  "modelRef": "#/components/schemas/AnnotatePhaseConfigDto",
                  "schema": [
                    {
                      "name": "configClass",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "BasicReviewPhaseConfigDto",
                  "description": "",
                  "modelRef": "#/components/schemas/BasicReviewPhaseConfigDto",
                  "schema": [
                    {
                      "name": "allowToPerformConsecutiveTasks",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "assignCorrectionsToLastInputAssignee",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "configClass",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "keepReviewerThroughoutPhase",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "DeliveryPhaseConfigDto",
                  "description": "",
                  "modelRef": "#/components/schemas/DeliveryPhaseConfigDto",
                  "schema": [
                    {
                      "name": "allowToPerformConsecutiveTasks",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "assignCorrectionsToLastInputAssignee",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "configClass",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "keepReviewerThroughoutPhase",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "SampledReviewPhaseConfigDto",
                  "description": "",
                  "modelRef": "#/components/schemas/SampledReviewPhaseConfigDto",
                  "schema": [
                    {
                      "name": "allowToPerformConsecutiveTasks",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "assignCorrectionsToLastInputAssignee",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "configClass",
                      "kind": "required",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "keepReviewerThroughoutPhase",
                      "kind": "required",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "ownerHasReviewActionAccess",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "sampleRatePercent",
                      "kind": "required",
                      "type": "number<double>",
                      "example": ""
                    }
                  ]
                }
              ]
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/PublicUpdateRequestPhaseDto",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "BadRequest",
            "schema": [
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/BadRequest",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Unauthorized",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Forbidden",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Forbidden",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "NotFound",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFound",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "413",
        "description": "Payload too large",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PayloadTooLarge",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/PayloadTooLarge",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PATCH \\\n     --url /v1/request-phases/{requestPhaseId} \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"config\": {\n     \"configClass\": \"\"\n     }\n     }'"
        },
        {
          "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 raw = JSON.stringify({\n   \"config\": {\n      \"configClass\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'PATCH',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/v1/request-phases/{requestPhaseId}\", 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(\"/v1/request-phases/{requestPhaseId}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Patch.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"config\": {\n      \"configClass\": \"\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/v1/request-phases/{requestPhaseId}\"\n\npayload = json.dumps({\n   \"config\": {\n      \"configClass\": \"\"\n   }\n})\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": ""
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-5-413",
          "language": "413",
          "code": "// Payload too large\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-6-500",
          "language": "500",
          "code": "// Internal server error\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "3uVTQ0gi_MbzAamZRuL7s",
      "type": "paragraph",
      "children": [
        {
          "text": "Update name and configuration of a phase"
        }
      ]
    }
  ]
}