---
id: deployment-update
title: "Update a deployment"
description: "Updates information for a deployment"
sidebar_label: "Update a deployment"
hide_title: true
hide_table_of_contents: true
api: eJztWVtv47gV/isEXzoBlMS5tmsgD94k203RZoKMp7ttJjCOxWOLOxSpISknHsP/vTikZEm2M/G03V20mBdDlkie23duPAsu0KVWFl4azfv8fSHAo2NST4zNgd6yibEMmMBCmXmO2vOEmwJt+HgjeJ83n/pl2M8T7mHqeP+BXzXbHhPuMC2t9HPef1jwMYJFOyh9xvsPj8vHhBdgIUeP1oUFGnLkfS4FT7gk7grwGU/WWB5myG6umJkwn2GLzQOecIufSmlR8L63JSbcpRnmwPsL7ucFne28lXrKlwnHZ8gLRe+OOPFCW9H5742Y0/rUaE9C9BccikLJNIh/+IsjHhabB5vxL5iSqgpLyvISXVjnwZduk4FtQkVdChb3bBew4XoiNSj5GQUJ47wFj9P5SIDfylWX2qXREzkto0kZ7QlG75Jj9aEHG1IJdKTlkXuSPs1QjLyFyUSm1bcWpTu0KWoPUyR5qn2sWs6mRuop8yZQ1vjEZmidNJooVhJI7XGKti36WW+5XCY8R+dgim3lgrUw35B2wJR0nujXWxg4Z1IZtP0kfbYu+Rs8mB4kTJmpSxhaa6xLmLG1ZaKh3B6xKT3m7nUcKJyh2g0GDmdIPsPCnhoGFes1aze3P7xN2E+D+9ub2z8n7Pr+/u39XhcgtIQ3etqNeAX7Nardg6/aEAEbIFumKTo3KZWaE83UiB0IDlip5aeSqApkUqD2cjIPkMiQ0d6W0dZ4uL7769t//O36djh6NxzcD6+viKyXOToPedGi3QBoU9r3Wj6z1Sb2lKHuKPsJHJuiptiHosPA0fl350fn573vzgmKTdh5qCzdqL3N1eM6E/dYWHSovWOworoOznYsTkjVGQMXwLmJyeA50gcdNbtGNTPtuPewQmWESgspr5q4tvA2O3TM0NLTI2lqXfwQc9nYiHmIQEEKAgBohs/ShedGjj+4VXC0q/AU4tcLclfpabmMVnKF0S465HGvtxmtCBOrVBes30h9EIT+ryQFKXbEZ+UeN1dbwnM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HIEbV9XEIW0FtOzAxthInCcvKHHTDSWtVndsicyHLVNr4wL8Hwar7kw+cXrzXFE4Cy+IDX8uwrdVflWgHQkh6BMUEepDKMRib0jdsdenEcBNvdSgl5aCo7kLBgna1B6lRrCDdRvByGT3kbJuHvIvqX/cQGYvc6sZIOldi3S4N7m6YkwL/z1zDtRVRgeGMXOOsd0w/J3trrdnv5hUkrNWgRnHRKKrsN/OPm4o8q6BzTWuip9AbmVJNBTOQik7dcJit239V1xloVmp8LjCl9BJFMmm48xEH7C5emXk7ZzAFqZkCj7b2msCXz4yIQ7OUpmZheNbnh00KOlxIsaR0GkSKM7fSUlWVeV+4/uEhFPJAl0oVCjz57UFq8jAdqwd578hVIsLb47yVLuggXs3dQmgMi+iqJjz8UPdgf/lpGMoCcsH7ZvJ2XWujmZx1Lto2rnJevu8IlxJN4/V7lJA0VCUmqzsTGjUe9A56rfKgoewIW4VxPocQk6pZaJzPro9jO0BrzSp3HedWxvL47A8LBTJckwUkLCrYPPDOhr4MV5KZcZ6+LRZjcPjequWSXn8q0dKI9zHhM7CS/CkoXEhHz4L3J6AcfoHvN/UV0B770nh3K991Q63JUDNQJf3jCf+I8zhMDrbIEATawFb8cBmJ7w9pe7NxIz8sk3rHIE2x8F9c+9jyw7vB8PJHQn41Uc4jhiw8UWKBp8ilCdoIDhXeLbgCPS0jMOOh5CfQdbM1twpibdXDYhFXDKkCXi5XaokVMc1klv8Cpo4nhQ==
sidebar_class_name: "patch api-method"
info_path: docs/api/deployments
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update a deployment"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/deployment/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Updates information for a deployment

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"name":"id","in":"path","description":"The ID of the deployment.","required":true,"schema":{"type":"string"},"example":"1"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"The updated status of the deployment.","example":"finalized"},"strategy_data":{"type":"object","description":"Configuration data for the deployment strategy.","properties":{"desired_switched_traffic":{"description":"Percentage of desired traffic going to the new version.","type":"integer","example":50}}},"messages":{"type":"array","description":"A list of messages associated with the deployment (e.g., logs, errors, or status updates).","items":{"type":"object","properties":{"level":{"type":"string","description":"The severity level of the message (e.g., INFO, WARNING, ERROR).","example":"INFO"},"message":{"type":"string","description":"The content of the message.","example":"Deployment started successfully"},"code":{"type":"string","description":"A unique code identifying the type of message.","example":"DEPLOYMENT_STARTED"},"timestamp":{"type":"integer","description":"The Unix timestamp when the message was generated.","example":1696166096}},"required":["level","message","timestamp"],"description":"Represents a message associated with a deployment, such as logs or status updates.","title":"deployment_message"},"example":[{"level":"INFO","message":"Deployment started successfully","code":"DEPLOYMENT_STARTED","timestamp":1696166096}]}},"description":"Request body for updating an existing deployment's status or strategy data.","title":"deployment_update"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"The unique ID for the deployment.","example":1},"scope_id":{"type":"integer","description":"The ID of the scope where the deployment belongs.","example":1234},"release_id":{"type":"integer","description":"The ID of the release associated with the deployment.","example":5678},"status":{"type":"string","enum":["creating_approval","creating_approval_denied","creating","waiting_for_instances","running","finalizing","finalized","cancelling","cancelled","failed","rolling_back","rolled_back","deleting","deleted"],"description":"The current status of the deployment.","example":"running"},"status_in_scope":{"type":"string","description":"The status of the deployment within its scope.","example":"ACTIVE"},"strategy":{"type":"string","description":"The deployment strategy being used.","enum":["initial","blue_green"],"example":"blue_green"},"strategy_data":{"type":"object","description":"Configuration data for the deployment strategy.","properties":{"switched_traffic":{"type":"integer","description":"Current percentage of traffic on the new version (0-100).","example":30},"desired_switched_traffic":{"type":"integer","description":"Target traffic percentage for the new version.","example":50},"amount_instances_to_wait":{"type":"integer","description":"Required number of instances before proceeding to the next step.","example":5},"healthy_instances":{"type":"integer","description":"Current count of healthy instances.","example":3},"launched_instances":{"type":"integer","description":"Total number of instances launched.","example":5},"switch_traffic_step":{"type":"boolean","description":"Indicates whether the deployment is in the active traffic switching phase.","example":true}}},"created_at":{"type":"string","format":"date-time","description":"The timestamp when the deployment was created.","example":"2023-10-01T12:34:56Z"},"updated_at":{"type":"string","format":"date-time","description":"The timestamp when the deployment was last updated.","example":"2023-10-01T12:34:56Z"},"messages":{"type":"array","description":"A list of messages associated with the deployment (e.g., logs, errors, or status updates).","items":{"type":"object","properties":{"level":{"type":"string","description":"The severity level of the message (e.g., INFO, WARNING, ERROR).","example":"INFO"},"message":{"type":"string","description":"The content of the message.","example":"Deployment started successfully"},"code":{"type":"string","description":"A unique code identifying the type of message.","example":"DEPLOYMENT_STARTED"},"timestamp":{"type":"integer","description":"The Unix timestamp when the message was generated.","example":1696166096}},"required":["level","message","timestamp"],"description":"Represents a message associated with a deployment, such as logs or status updates.","title":"deployment_message"},"example":[{"level":"INFO","message":"Deployment started successfully","code":"DEPLOYMENT_STARTED","timestamp":1696166096}]},"deployment_token":{"type":"string","description":"A unique token associated with the deployment for authentication or tracking purposes.","example":"abc123xyz"},"nrn":{"type":"string","description":"The resource name (NRN) uniquely identifying the deployment.","example":"organization=1:account=2:namespace=4:application=4:scope=5"}},"required":["id","scope_id","release_id","status","strategy","strategy_data","created_at","updated_at","messages","deployment_token","nrn"],"description":"Represents a deployment object with all its associated metadata and configuration.","title":"deployment"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      