This endpoint is not live yet. The shapes below show how it is expected to work so you can plan your
integration, and may change before release. Calls to this path return 404 today.
Authorizations
Authorization
string
header
required
Your account API token, sent as Authorization: Bearer <api_token>. Owners and admins can read the token from the LocalOps console.
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"LocalOps Documentation","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/localops/JRMe5AvRiyD5FHvi/logo/light.svg?fit=max\u0026auto=format\u0026n=JRMe5AvRiyD5FHvi\u0026q=85\u0026s=19102ad522bdd446edbbce90d070c548","dark":"https://mintcdn.com/localops/JRMe5AvRiyD5FHvi/logo/dark.svg?fit=max\u0026auto=format\u0026n=JRMe5AvRiyD5FHvi\u0026q=85\u0026s=25626943a6ff4d7975611041f009cc05"},"favicon":"https://mintcdn.com/localops/JRMe5AvRiyD5FHvi/favicon.svg?fit=max\u0026auto=format\u0026n=JRMe5AvRiyD5FHvi\u0026q=85\u0026s=7a62c6f75b53d403484ee016109a09d2","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true}},"navbar":{"links":[{"href":"https://console.localops.co","label":"Console"},{"href":"https://go.localops.co/tour","label":"Schedule demo"}],"primary":{"type":"button","label":"Get started for free","href":"https://console.localops.co/signup"}},"footer":{"socials":{"x":"https://x.com/localopsco","github":"https://github.com/localopsco","linkedin":"https://linkedin.com/company/localops-inc"}},"integrations":{"gtm":{"tagId":"GTM-PWH8VTN6"},"posthog":{"apiKey":"phc_T54pQDyo3sFjCz7a3fm2XCCoDAt7iA0l2KM9qBKauF3","apiHost":"https://watermelon.localops.co"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"newspaper","href":"/changelogs/2026"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"localops","hasAudioNarration":false,"actualSubdomain":"localops","customDomains":["docs.localops.co"],"gitSource":{"type":"github","owner":"localopsco","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6b09358e05f802569277e964","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Documentation","count":115},{"language":"default","tag":"Services","count":31},{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"Endpoints","count":22},{"language":"default","tag":"Bring your helm charts (soon)","count":15},{"language":"default","tag":"Environments","count":15},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Team","count":8},{"language":"default","tag":"AWS services","count":8},{"language":"default","tag":"Instrument services","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".sidebar-group-icon[src$=\"mcp.svg\"]{background-color:currentColor!important;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='10 14.5 176 176' fill='none'%3E%3Cpath d='M25 97.8528L92.8823 29.9706C102.255 20.598 117.451 20.598 126.823 29.9706V29.9706C136.196 39.3431 136.196 54.5391 126.823 63.9117L75.5581 115.177' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3Cpath d='M76.2653 114.47L126.823 63.9117C136.196 54.5391 151.392 54.5391 160.765 63.9117L161.118 64.2652C170.491 73.6378 170.491 88.8338 161.118 98.2063L99.7248 159.6C96.6006 162.724 96.6006 167.789 99.7248 170.913L112.331 183.52' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3Cpath d='M109.853 46.9411L59.6482 97.1457C50.2757 106.518 50.2757 121.714 59.6482 131.087V131.087C69.0208 140.459 84.2168 140.459 93.5894 131.087L143.794 80.8822' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3C/svg%3E\") center / contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='10 14.5 176 176' fill='none'%3E%3Cpath d='M25 97.8528L92.8823 29.9706C102.255 20.598 117.451 20.598 126.823 29.9706V29.9706C136.196 39.3431 136.196 54.5391 126.823 63.9117L75.5581 115.177' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3Cpath d='M76.2653 114.47L126.823 63.9117C136.196 54.5391 151.392 54.5391 160.765 63.9117L161.118 64.2652C170.491 73.6378 170.491 88.8338 161.118 98.2063L99.7248 159.6C96.6006 162.724 96.6006 167.789 99.7248 170.913L112.331 183.52' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3Cpath d='M109.853 46.9411L59.6482 97.1457C50.2757 106.518 50.2757 121.714 59.6482 131.087V131.087C69.0208 140.459 84.2168 140.459 93.5894 131.087L143.794 80.8822' stroke='black' stroke-width='12' stroke-linecap='round'/%3E%3C/svg%3E\") center / contain no-repeat;object-position:-9999px 0}"}]}
{"page":{"pagePath":"api-reference/environments/delete-environment","slug":"/api-reference/environments/delete-environment","pageMetadata":{"title":"Delete Environment","description":"Delete an environment and tear down its infrastructure.\n\nThe environment moves through `archive_queued`, `archiving` and `archived`, or `archive_failed` on failure.","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json delete /v1/environments/{envId}","href":"/api-reference/environments/delete-environment","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Delete an environment and tear down its infrastructure.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The environment moves through \", _jsx(_components.code, {\n children: \"archive_queued\"\n }), \", \", _jsx(_components.code, {\n children: \"archiving\"\n }), \" and \", _jsx(_components.code, {\n children: \"archived\"\n }), \", or \", _jsx(_components.code, {\n children: \"archive_failed\"\n }), \" on failure.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Warning}=_components;if(!Warning)_missingMdxReference(`Warning`,true);return _jsx(Warning,{children:_jsxs(_components.p,{children:[`This endpoint is not live yet. The shapes below show how it is expected to work so you can plan your\nintegration, and may change before release. Calls to this path return `,_jsx(_components.code,{children:`404`}),` today.`]})})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Delete Environment","description":"Delete an environment and tear down its infrastructure.\n\nThe environment moves through `archive_queued`, `archiving` and `archived`, or `archive_failed` on failure.","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json delete /v1/environments/{envId}","href":"/api-reference/environments/delete-environment","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/localops/406290af916b5fc4/crisp-widget.js"],"openApiReferenceData":{"operation":{"tags":["Environments"],"summary":"Delete Environment","operationId":"deleteEnvironment","x-mint":{"metadata":{"tag":"COMING SOON","playground":"none"},"content":"\u003cWarning>\n This endpoint is not live yet. The shapes below show how it is expected to work so you can plan your\n integration, and may change before release. Calls to this path return `404` today.\n\u003c/Warning>\n"},"description":"Delete an environment and tear down its infrastructure.\n\nThe environment moves through `archive_queued`, `archiving` and `archived`, or `archive_failed` on failure.","parameters":["6a87134d-6cb5-4f03-bcde-59222b6d5550"],"responses":{"202":"6335b2dd-080d-434e-bc3a-7266cf7a7afb","401":"91bafbcf-c303-4af5-ac37-3c38d2e67781","404":"219269aa-4da8-4afe-9cfc-1e9376e08e1c","409":"421c8aec-1ce2-4743-b3ba-bf7ba428d60f","422":"3829bf78-7f67-4e55-9c7c-f1f9d558d28a","500":"c05e2cf8-9ee3-4e4c-a2de-1bb307556184"},"method":"delete","type":"path","servers":["92365f02-5544-410d-89dc-c47d8041cca8"],"security":["5e037ee9-821d-45d6-9720-78f9a60e0dfa"],"path":"/v1/environments/{envId}","baseUrlOptions":["https://sdk.localops.co"],"title":"Delete Environment","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","go"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[]},"dependencies":{"parameters":{"6a87134d-6cb5-4f03-bcde-59222b6d5550":{"name":"envId","in":"path","required":true,"description":"The unique identifier of the environment","schema":{"type":"string","format":"uuid","isRequired":true,"description":"The unique identifier of the environment","uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"responses":{"6335b2dd-080d-434e-bc3a-7266cf7a7afb":{"description":"Environment delete accepted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"data":{"type":"object","properties":{"op_id":{"type":"string","format":"uuid","uniqueKey":"data.op_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"accepted","data":{"op_id":"8b41c6d0-0000-0000-0000-000000000000"}},"examples":{"Example":{"title":"Example","value":{"message":"accepted","data":{"op_id":"8b41c6d0-0000-0000-0000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"91bafbcf-c303-4af5-ac37-3c38d2e67781":{"description":"Missing, malformed or unknown API token","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","enum":["unauthorized","forbidden","notfound","conflict","validation","unknown"],"description":"Machine readable error code. Treat this, and not the HTTP status, as the signal for whether the request was at fault - some business rule violations are returned as `500` with `error_code: validation`.","uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human readable error message","uniqueKey":"message","typeLabel":"string"},"errors":{"oneOf":[{"type":"array","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation","uniqueKey":"errors.oneOf.0.items.[INDEX].field","typeLabel":"string"},"error":{"type":"string","description":"Reason the field was rejected","uniqueKey":"errors.oneOf.0.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation"},"error":{"type":"string","description":"Reason the field was rejected"}}},"uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error_code":"unauthorized","message":"You are not authorized to do this action"},"examples":{"Example":{"title":"Example","value":{"error_code":"unauthorized","message":"You are not authorized to do this action"}}},"exampleType":"examples"}},"exampleType":"examples"},"219269aa-4da8-4afe-9cfc-1e9376e08e1c":{"description":"The environment, service, deployment, custom domain or connection does not exist, or belongs to another account","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","enum":["unauthorized","forbidden","notfound","conflict","validation","unknown"],"description":"Machine readable error code. Treat this, and not the HTTP status, as the signal for whether the request was at fault - some business rule violations are returned as `500` with `error_code: validation`.","uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human readable error message","uniqueKey":"message","typeLabel":"string"},"errors":{"oneOf":[{"type":"array","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation","uniqueKey":"errors.oneOf.0.items.[INDEX].field","typeLabel":"string"},"error":{"type":"string","description":"Reason the field was rejected","uniqueKey":"errors.oneOf.0.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation"},"error":{"type":"string","description":"Reason the field was rejected"}}},"uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error_code":"notfound","message":"Service not found"},"examples":{"Example":{"title":"Example","value":{"error_code":"notfound","message":"Service not found"}}},"exampleType":"examples"}},"exampleType":"examples"},"421c8aec-1ce2-4743-b3ba-bf7ba428d60f":{"description":"The service is protected against deletion","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","enum":["unauthorized","forbidden","notfound","conflict","validation","unknown"],"description":"Machine readable error code. Treat this, and not the HTTP status, as the signal for whether the request was at fault - some business rule violations are returned as `500` with `error_code: validation`.","uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human readable error message","uniqueKey":"message","typeLabel":"string"},"errors":{"oneOf":[{"type":"array","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation","uniqueKey":"errors.oneOf.0.items.[INDEX].field","typeLabel":"string"},"error":{"type":"string","description":"Reason the field was rejected","uniqueKey":"errors.oneOf.0.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation"},"error":{"type":"string","description":"Reason the field was rejected"}}},"uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error_code":"conflict","message":"Cannot delete a protected service. Remove protection first."},"examples":{"Example":{"title":"Example","value":{"error_code":"conflict","message":"Cannot delete a protected service. Remove protection first."}}},"exampleType":"examples"}},"exampleType":"examples"},"3829bf78-7f67-4e55-9c7c-f1f9d558d28a":{"description":"Field validation failed, or the request body was missing or malformed. Endpoints that take a body always need at least `{}` - a zero byte body fails to bind.","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","enum":["unauthorized","forbidden","notfound","conflict","validation","unknown"],"description":"Machine readable error code. Treat this, and not the HTTP status, as the signal for whether the request was at fault - some business rule violations are returned as `500` with `error_code: validation`.","uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human readable error message","uniqueKey":"message","typeLabel":"string"},"errors":{"oneOf":[{"type":"array","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation","uniqueKey":"errors.oneOf.0.items.[INDEX].field","typeLabel":"string"},"error":{"type":"string","description":"Reason the field was rejected","uniqueKey":"errors.oneOf.0.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation"},"error":{"type":"string","description":"Reason the field was rejected"}}},"uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"field":{"title":"field","summary":"Field validation","value":{"error_code":"validation","message":"Invalid data","errors":[{"field":"replica_count","error":"replica_count is a required field"}]}},"body":{"title":"body","summary":"Missing or malformed body","value":{"error_code":"validation","message":"Please check your request body"}}},"exampleType":"examples"}},"exampleType":"examples"},"c05e2cf8-9ee3-4e4c-a2de-1bb307556184":{"description":"Unexpected failure. Some business rule violations are also returned here with `error_code: validation` - check `error_code` rather than the status to decide whether the request was at fault.","content":{"application/json":{"schema":{"type":"object","properties":{"error_code":{"type":"string","enum":["unauthorized","forbidden","notfound","conflict","validation","unknown"],"description":"Machine readable error code. Treat this, and not the HTTP status, as the signal for whether the request was at fault - some business rule violations are returned as `500` with `error_code: validation`.","uniqueKey":"error_code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human readable error message","uniqueKey":"message","typeLabel":"string"},"errors":{"oneOf":[{"type":"array","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation","uniqueKey":"errors.oneOf.0.items.[INDEX].field","typeLabel":"string"},"error":{"type":"string","description":"Reason the field was rejected","uniqueKey":"errors.oneOf.0.items.[INDEX].error","typeLabel":"string"}},"uniqueKey":"errors.oneOf.0.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors.oneOf.0","typeLabel":"object[]"},{"type":"null","description":"Per field details. Present only on validation errors, and can be null when the failure has no field level detail.","items":{"type":"object","properties":{"field":{"type":"string","description":"Name of the request field that failed validation"},"error":{"type":"string","description":"Reason the field was rejected"}}},"uniqueKey":"errors.oneOf.1","typeLabel":"null"}],"uniqueKey":"errors","typeLabel":"object[] | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unknown":{"title":"unknown","summary":"Unexpected failure","value":{"error_code":"unknown","message":"Something went wrong. Please try again later"}},"rule":{"title":"rule","summary":"Business rule violation","value":{"error_code":"validation","message":"Ops Json is only supported for docker image source"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"5e037ee9-821d-45d6-9720-78f9a60e0dfa":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"UUID","description":"Your account API token, sent as `Authorization: Bearer \u003capi_token>`. Owners and admins can read the token from the LocalOps console.","scopes":[]}}},"servers":{"92365f02-5544-410d-89dc-c47d8041cca8":{"url":"https://sdk.localops.co"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"UUID","description":"Your account API token, sent as `Authorization: Bearer \u003capi_token>`. Owners and admins can read the token from the LocalOps console.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your account API token, sent as `Authorization: Bearer \u003capi_token>`. Owners and admins can read the token from the LocalOps console.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"localops","siteName":"LocalOps Documentation","title":"Delete Environment - LocalOps Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T10:34:53.018Z","originalFileLocation":"api-reference/environments/delete-environment.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Delete an environment and tear down its infrastructure. The environment moves through archive_queued, archiving and archived, or archive_failed on failure.\">\u003cmeta data-mint-head name=\"application-name\" content=\"LocalOps Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Delete Environment - LocalOps Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Delete an environment and tear down its infrastructure. The environment moves through archive_queued, archiving and archived, or archive_failed on failure.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"LocalOps Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.localops.co/api-reference/environments/delete-environment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://localops.mintlify.site/_mintlify/api/og/v2?division=Environments\u0026amp;title=Delete+Environment\u0026amp;description=Delete+an+environment+and+tear+down+its+infrastructure.%0A%0AThe+environment+moves+through+%60archive_queued%60%2C+%60archiving%60+and+%60archived%60%2C+or+%60archive_failed%60+on+fail\u0026amp;theme=804495f77666a63209204197\u0026amp;signature=1636cbc64f5656ec2f84d8cf8ff62417f3ec4ce7867d74d64b6315bedab65313\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Delete Environment - LocalOps Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Delete an environment and tear down its infrastructure. The environment moves through archive_queued, archiving and archived, or archive_failed on failure.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://localops.mintlify.site/_mintlify/api/og/v2?division=Environments\u0026amp;title=Delete+Environment\u0026amp;description=Delete+an+environment+and+tear+down+its+infrastructure.%0A%0AThe+environment+moves+through+%60archive_queued%60%2C+%60archiving%60+and+%60archived%60%2C+or+%60archive_failed%60+on+fail\u0026amp;theme=804495f77666a63209204197\u0026amp;signature=1636cbc64f5656ec2f84d8cf8ff62417f3ec4ce7867d74d64b6315bedab65313\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/localops/pHwHvLNeB34v2aZJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"LocalOps Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.localops.co/api-reference/environments/delete-environment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/environments/delete-environment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.localops.co/#organization\",\"name\":\"LocalOps Documentation\",\"url\":\"https://docs.localops.co\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/localops/JRMe5AvRiyD5FHvi/logo/light.svg?fit=max\u0026auto=format\u0026n=JRMe5AvRiyD5FHvi\u0026q=85\u0026s=19102ad522bdd446edbbce90d070c548\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.localops.co#website\",\"name\":\"LocalOps Documentation\",\"url\":\"https://docs.localops.co\",\"publisher\":{\"@id\":\"https://docs.localops.co/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.localops.co/api-reference/environments/delete-environment#webpage\",\"url\":\"https://docs.localops.co/api-reference/environments/delete-environment\",\"name\":\"Delete Environment\",\"description\":\"Delete an environment and tear down its infrastructure. The environment moves through archive_queued, archiving and archived, or archive_failed on failure.\",\"dateModified\":\"2026-10-09T10:34:53.018Z\",\"isPartOf\":{\"@id\":\"https://docs.localops.co#website\"},\"breadcrumb\":{\"@id\":\"https://docs.localops.co/api-reference/environments/delete-environment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.localops.co/api-reference/environments/delete-environment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.localops.co/api-reference/health/health-check\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Environments\",\"item\":\"https://docs.localops.co/api-reference/environments/create-environment\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Delete Environment\",\"item\":\"https://docs.localops.co/api-reference/environments/delete-environment\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.localops.co/api-reference/environments/delete-environment#apireference\",\"headline\":\"Delete Environment\",\"name\":\"Delete Environment\",\"description\":\"Delete an environment and tear down its infrastructure. The environment moves through archive_queued, archiving and archived, or archive_failed on failure.\",\"url\":\"https://docs.localops.co/api-reference/environments/delete-environment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.localops.co/api-reference/environments/delete-environment#webpage\"},\"dateModified\":\"2026-10-09T10:34:53.018Z\",\"publisher\":{\"@id\":\"https://docs.localops.co/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.localops.co#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"LocalOps Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"LocalOps Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/environments/delete-environment.md","siteName":"LocalOps Documentation","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"newspaper","href":"/changelogs/2026"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Getting Started","href":"/api/getting-started"},{"title":"Common workflows","href":"/api/workflows"}]},{"group":"Endpoints","pages":[{"group":"Health","pages":[{"title":"Health Check","deprecated":null,"version":null,"openapi":"/openapi.json get /health","href":"/api-reference/health/health-check"}]},{"group":"Environments","pages":[{"title":"Create Environment","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json post /v1/environments","href":"/api-reference/environments/create-environment"},{"title":"Get Environment","description":"Read an environment's identity, lifecycle state, network edges and workload identity.\n\nThree fields exist so you can wire your own infrastructure to the environment, and all three are read live from the environment's infrastructure on every request:\n\n- `ingress_host` is the load balancer in front of the environment's ingress. Point your own DNS records at it - a `CNAME` when it is a hostname (AWS), an `A` record when it is an IP address (GCP).\n- `public_nat_ips` are the NAT gateway addresses the environment's outbound traffic leaves from. Allowlist them in your own firewalls and database security groups.\n- `svc_role_arn` is the IAM role the environment's pods assume on AWS. Name it as a principal in your own bucket, queue and KMS key policies. It is an identifier and not a credential, so naming it grants nothing until you also set up the trust in your own account.\n\nAll three are empty until the environment is provisioned. `svc_role_arn` is always empty on GCP, where the equivalent identity is a service account rather than a role.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/environments/{envId}","href":"/api-reference/environments/get-environment"},{"title":"Delete Environment","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json delete /v1/environments/{envId}","href":"/api-reference/environments/delete-environment"}]},{"group":"Services","pages":[{"title":"Create Service","description":"Create a service inside an environment. The service is registered with the provisioner and persisted, service level secrets are optionally seeded, and an immediate first deployment is optionally triggered.\n\nThe service `subdomain` is generated by LocalOps and cannot be supplied.\n\n**`deploy_now`** triggers a deployment right after creation with an empty target - the latest commit on the configured branch for git sources, and the `latest` tag for `docker_image`. No chart version is passed for `helm_chart`, so prefer `deploy_now: false` plus an explicit deploy call with `helm_chart_version`. `deploy_now` does not return a deployment id. If creation succeeds but the deployment fails, the service still exists and the call returns `500` with `Service created successfully, but failed to deploy the service`.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/environments/{envId}/services","href":"/api-reference/services/create-service"},{"title":"Get Service Status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/environments/{envId}/services/{serviceId}","href":"/api-reference/services/get-service-status"},{"title":"Delete Service","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/environments/{envId}/services/{serviceId}","href":"/api-reference/services/delete-service"},{"title":"Update Service","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/environments/{envId}/services/{serviceId}","href":"/api-reference/services/update-service"}]},{"group":"Deployments","pages":[{"title":"Deploy Service","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/environments/{envId}/services/{serviceId}/deploy","href":"/api-reference/deployments/deploy-service"},{"title":"Get Deployment","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/deployments/{deploymentId}","href":"/api-reference/deployments/get-deployment"},{"title":"Cancel Deployment","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json post /v1/deployments/{deploymentId}/cancel","href":"/api-reference/deployments/cancel-deployment"}]},{"group":"Operations","pages":[{"title":"Get Operation","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json get /v1/operations/{opId}","href":"/api-reference/operations/get-operation"},{"title":"Get Operation Logs","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json get /v1/operations/{opId}/logs","href":"/api-reference/operations/get-operation-logs"}]},{"group":"Custom Domains","pages":[{"title":"Get Custom Domains","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/environments/{envId}/services/{serviceId}/custom-domains","href":"/api-reference/custom-domains/get-custom-domains"},{"title":"Add Custom Domain","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/environments/{envId}/services/{serviceId}/custom-domains","href":"/api-reference/custom-domains/add-custom-domain"},{"title":"Delete Custom Domain","deprecated":null,"version":null,"tag":"COMING SOON","playground":"none","openapi":"/openapi.json delete /v1/environments/{envId}/services/{serviceId}/custom-domains/{customDomainId}","href":"/api-reference/custom-domains/delete-custom-domain"},{"title":"Verify Custom Domain","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/environments/{envId}/services/{serviceId}/custom-domains/{customDomainId}/verify","href":"/api-reference/custom-domains/verify-custom-domain"},{"title":"Force Deploy Custom Domain","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/environments/{envId}/services/{serviceId}/custom-domains/{customDomainId}/force-deploy","href":"/api-reference/custom-domains/force-deploy-custom-domain"}]},{"group":"Secrets","pages":[{"title":"Get Environment Secrets","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/environments/{envId}/secrets","href":"/api-reference/secrets/get-environment-secrets"},{"title":"Replace Environment Secrets","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/environments/{envId}/secrets","href":"/api-reference/secrets/replace-environment-secrets"},{"title":"Get Service Secrets","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/environments/{envId}/services/{serviceId}/secrets","href":"/api-reference/secrets/get-service-secrets"},{"title":"Replace Service Secrets","deprecated":null,"version":null,"openapi":"/openapi.json put /v1/environments/{envId}/services/{serviceId}/secrets","href":"/api-reference/secrets/replace-service-secrets"}]}]},{"group":"No Access Delivery","icon":"key","pages":[{"title":null,"href":"/api/no-access-delivery/license-tokens"}]}]}]},"basePath":"","title":"Delete Environment - LocalOps Documentation","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CyAr6xD1.js","snippetPresets-BSqedH3o.js","utils-DXfQSZU_.js","style-to-object-BY3JEAdk.js","utils-DiMyLQC-.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DvPCxzT8.js","conditional-requirements-CFM0id0Q.js","cloneDeep-dx7iM-7h.js","_Uint8Array-DpQIK2Aw.js","isObject-FP1Yky1u.js","Page-wigwbDGe.js","api-description-markdown-DHZIfeWZ.js","DynamicMarkdown-D8KwOkxZ.js","CodeSnippet-C87it1Zg.js","use-playground-group-access-DyECiQ2v.js","SectionHeading-uish4Ed2.js","ApiExamples-B2sy5qvP.js","usePlaygroundInputsStore-BDc5FJKB.js","shallow-DxZq5uhD.js","isEqual-Bl_IuwU4.js","CodeSnippets-D1UoeS-I.js","MethodPill-DR7O5MCP.js","getPastedJson-D2WQib0m.js","Check2Icon-CUuzblYS.js","axios-CsQoIw0U.js","Markdown-K6_WYP3x.js","AssistantPageLink-BrppVW5v.js","dist-OmDnwAnM.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}