---
title: "Change an environment's workload mode (internal, operator-only)"
method: PUT
path: "/internal/environments/{environment_id}/workload-mode"
tags: ["Workload Placement"]
---

# Change an environment's workload mode (internal, operator-only)

`PUT /internal/environments/{environment_id}/workload-mode`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/internal/environments/{environment_id}/workload-mode`
- Auth: HTTP bearer

An ADR-055 migration control for operators and the CLI; the console does
not show it. Environments default to `legacy` and need no change here.

## Path parameters

- `environment_id` integer, required

## Request body

- SetWorkloadModeRequest
  - `workload_mode` 'legacy' | 'shadow' | 'enforce', required: `legacy` (today's deploy path), `shadow` (legacy, plus a logged unified-scheduler comparison) or `enforce` (control-plane replicas run through the workload plane). `legacy` is the rollback.

## Response `200`

- WorkloadModeResponse
  - `environment_id` integer, required
  - `workload_mode` 'legacy' | 'shadow' | 'enforce', required

## Other responses

- `400`: Invalid mode
- `401`: Unauthorized
- `403`: Instance admin required
- `404`: Environment not found
- `500`: Storage failed

## Changes

- **2026-11-09** `12896146b193`: 5 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …1 more
- **2026-10-28** `b8d51a990805`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/internal/environments/:environment_id/workload-mode/put.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
