---
title: "Set the capacity of a rig"
method: PUT
path: "/clusters/{clusterID}/rigs/{rigID}/capacity"
tags: ["admin"]
---

# Set the capacity of a rig

`PUT /clusters/{clusterID}/rigs/{rigID}/capacity`

## Request

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

Set the desired instance count on the rig's scaling group. The value is passed to the cloud provider unchanged; violations of the group's bounds or conflicting concurrent operations surface as errors.

## Path parameters

- `clusterID` string, uuid, required
- `rigID` string, required

## Request body

- RigCapacityChange: Desired capacity to set on the rig's scaling group
  - `desired` integer, required: Absolute desired number of instances in the rig

## Response `202`

Capacity change 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/:rigID/capacity/put.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)
