---
id: deployment-strategy-create
title: "Create deployment strategy"
description: "Creates a new deployment strategy"
sidebar_label: "Create deployment strategy"
hide_title: true
hide_table_of_contents: true
api: eJztWW1v2zYQ/isEgQEboDhyEnebgH5I2w1LMbRBk2LAUsM4U2eLLUWqJJXUNfTfh6OkWLLl1u3aFRv2RXHEl3vuePfcHbXmKTphZeGl0Tzhjy2CR8eAabxjKRbKrHLUnjlvweNyxSPuYel4csOfDIxOI24KtEDbXaQ84ZstZu2kRAQhPOIORWmlX/HkZs3nCBbteekzntxMq2nELb4t0flHJl3xZB3+lRZTnnhbYsSF0R61pyEoCiVFkHr82pEma+5EhjnQL78qkCfczF+j8DzqbHTDNeSERFtN2AtL6L1ER+vC2Ga981bqJY+2THadIaOZzCyYz3DIaCMecXwHeaEw2Fh6KUANmrfa2v5j0s/Z3EpcsM7bg4FcNW/ZwlgmdlE55jPwTGQo3jiG1hrLaAUDnTJrlJoDDcgF04gppgSeDHmQyZ69eNYCRe2lX9XC9gBn0jFwzggJHlN2J33W18XYJWj5PrjAw3ECQphS+4cnCR2NK0Dgw9Ok4yYPz4KpZY7aSaPdkJ/0Qd9ba7MoGC4HLzKpl8wJU6AjWJCmklaBuuw4VO21KS6gVOS1VQf/mqO+ldboPHg0dx6WZLmqingBFnL0aA8A+fTq+TN2FTw/gLsFJVPwAV6Lf7PfJ2CtIh70m5H8mUy7WMBaIGKQHvPue6k9LtHu+DT/XTpPhx92ZDSbXTzZOWDmM+mGXfdmfHJ6Noke/PjTz/GUsHnpgxvU1LJhpqv7uKpomkVXGO3q8D6Jx/SnD22A1Fi9acpcKQQ6tyiVInU/m3/6LCPTjwfMSy3flshkSqGykGjD4R4U5MFSITIPYrNn34zJnvzPYP8OBvv3kFYP6zaGljKGIr6Dfjtcc/RWigO0emz0Qi5Li6xecjQHhxuv29kYNcwVdslgboxC0LyjE6lIPFYqPISB91DOPiporBWqu8z7YhQiZkZG4VNi2cyiy4zqgtRlPq85vi78jB3cWZc57boMVGpnPgt6KXSu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QuwQk6439HnYN4PaDTy+88eFAqlDKWdD/1I75c3QpwKi0IxcN7nh6zU10C+tqip6/bZESx8OphG/BSspXsN3g4hnCCna4MVvcFU3ZAT16JpA0HRVho5hm/Wpx6lXnAuBhf/g3Gknui6fX12TLzcfKvLArNzCHWULuOMJD02rb888vFtzBXpZBtrg9Z7k+dAPnK1ACVq1HY9edRCu1/WMa/MGdVXxqFHF0/+hta3+AtDWDr4=
sidebar_class_name: "post 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={"Create deployment strategy"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/deployment_strategy"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Creates a new deployment strategy

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

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","nrn"],"properties":{"name":{"type":"string","description":"The name of the deployment strategy.","example":"Critical deployment strategy"},"description":{"type":"string","description":"A brief description of the deployment strategy.","example":"Strategy for critical deployments that checks error rate and rollbacks if needed"},"nrn":{"type":"string","description":"The NRN of the entity that the deployment strategy is associated with.","example":"organization=1:account=2:namespace=3:application=4"},"dimensions":{"type":"object","description":"Strategy dimensions for matching scopes.","additionalProperties":true,"default":{},"example":{"environment":"staging"}},"parameters":{"type":"object","description":"JSON Schema for validating strategy parameters.","additionalProperties":true,"default":{}},"scope_type_ids":{"type":"array","items":{"type":"integer"},"description":"List of scope type IDs associated with this strategy.","example":[12345,67890]}},"title":"createDeploymentStrategy"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"description":"Deployment strategy created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the deployment strategy.","example":"12345"},"name":{"type":"string","description":"Name of the deployment strategy.","example":"Critical deployment strategy"},"description":{"type":"string","description":"Description of the deployment strategy.","example":"Strategy for critical deployments that checks error rate and rollbacks if needed"},"nrn":{"type":"string","description":"The NRN of the entity that the deployment strategy is associated with.","example":"organization=1:account=2:namespace=3:application=4"},"dimensions":{"type":"object","description":"Strategy dimensions for matching scopes.","additionalProperties":true,"example":{"environment":"staging"}},"parameters":{"type":"object","description":"JSON Schema for validating strategy parameters.","additionalProperties":true,"default":{},"example":{"type":"object","title":"Deployment strategy parameters","properties":{"metrics":{"type":"object","description":"Configure metric-based rollback","properties":{"enabled":{"type":"boolean","default":true},"rules":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","examples":["http.error_rate"]},"threshold":{"type":"number"},"operator":{"type":"string","enum":["greater_than","less_than","equals"]}},"required":["name","threshold","operator"]},"default":[{"name":"http.error_rate","threshold":0.5,"operator":"less_than"}]}},"required":["enabled"]},"traffic":{"type":"object","description":"Configure traffic switching","properties":{"enable_auto_switch":{"type":"boolean","default":false},"interval":{"type":"integer","default":10},"step":{"oneOf":[{"const":0.1,"title":"10%"},{"const":0.5,"title":"50%"},{"const":1,"title":"100%"}],"default":0.1}},"required":["enable_auto_switch","interval","step"]}},"required":["metrics","traffic"]}},"scope_type_ids":{"type":"array","items":{"type":"string"},"description":"List of scope type IDs associated with this strategy.","example":["12345","67890"]},"created_by":{"type":"string","description":"ID of the user who created the strategy.","example":"123"},"updated_by":{"type":"string","description":"ID of the user who last updated the strategy.","example":"456"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the strategy was created.","example":"2023-10-01T12:34:56Z"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the strategy was last updated.","example":"2023-10-01T12:34:56Z"}},"required":["id","name","nrn"],"title":"deploymentStrategy"}}}},"400":{"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."}}}}}},"500":{"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>


      