---
title: "Disconnect Environment"
method: POST
path: "/v1/accounts/{account_id}/environments/{environment_id}:disconnect"
tags: ["gateway.openapi_Gateway"]
---

# Disconnect Environment

`POST /v1/accounts/{account_id}/environments/{environment_id}:disconnect`

Disconnects the environment from the node pool. Returns an error
if the environment is not connected to a node pool.

## Path parameters

- `account_id` string, required
- `environment_id` string, required

## Request body

- GatewayDisconnectEnvironmentBody
  - `force` boolean — Disconnect the environment even if snapshotting fails (e.g. due to pod failure). This flag should only be used if you are certain that the pod is gone.
  - `resetSnapshots` boolean — Forces snapshots to be rebuilt. This can be used when there are too many snapshot layers or when an unforeseen snapshotting logic error has occurred.

## Response `200`

A successful response.

- object

---

[API](https://skmtc.net/fw-ai-external/apis/gateway-rest-api.md) · [All operations](https://skmtc.net/fw-ai-external/apis/gateway-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fw-ai-external/gateway-rest-api/revisions/29a1e4db152c/schema)
