---
title: "Terminate an instance of a rig"
method: DELETE
path: "/clusters/{clusterID}/rigs/instances/{instanceID}"
tags: ["admin"]
---

# Terminate an instance of a rig

`DELETE /clusters/{clusterID}/rigs/instances/{instanceID}`

## Request

- Base URL: `https://api.e2b.app`
- URL: `https://api.e2b.app/clusters/{clusterID}/rigs/instances/{instanceID}`
- Auth: one of:
  - API key in header `X-Admin-Token`
  - HTTP bearer

Terminate an instance in whichever rig's scaling group it belongs to. The caller chooses whether the rig shrinks or the instance is replaced.

## Path parameters

- `clusterID` string, uuid, required
- `instanceID` string, required

## Query parameters

- `decrementDesired` boolean, required

## Response `202`

Instance termination accepted

## Other responses

- `400`: Bad request
- `401`: Authentication error
- `404`: Not found
- `409`: Conflict
- `429`: Too many requests
- `500`: Server error
- `501`: Not implemented by this deployment

## Changes

- **2026-09-14** `a37f50c70019`: 1 info
  - added the non-success response with the status `429`
- **2026-09-07** `fc7dc26a953d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/e2b-dev/apis/e2b-api/changes/clusters/:clusterID/rigs/instances/:instanceID/delete.md)

---

[API](https://skmtc.dev/e2b-dev/apis/e2b-api.md) - [All operations](https://skmtc.dev/e2b-dev/apis/e2b-api/llms.txt) - [OpenAPI document](https://skmtc.dev/e2b-dev/apis/e2b-api/revisions/99fccbc60e6d?raw)
