---
title: "Unpublish an environment"
method: DELETE
path: "/projects/{projectId}/environments/{environmentId}/scenario"
tags: ["User testing"]
---

# Unpublish an environment

`DELETE /projects/{projectId}/environments/{environmentId}/scenario`

Takes the scenario down. Deliberately NOT behind the beta gate that guards publishing: an organization that loses the flag must still be able to take a live scenario down.

Unpublishing something already unpublished answers 200 with `deleted: false` — a no-op, not an error.

## Response `200`

The scenario was removed (or there was none).

- ScenarioDeleted
  - `environmentId` string, required
  - `deleted` boolean, required — False when the environment had no scenario. NOT an error — unpublishing something already unpublished is a no-op.
  - `id` string

## Other responses

- `401` — Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is a property of the server, not your key.
- `403` — Key is valid but not allowed to do this.
- `404` — Unknown project, server, or resource.
- `429` — Per-key rate limit exceeded (60 requests/minute sustained, bursts up to 10). Honor `Retry-After` and back off with jitter.
- `500` — Something failed on MCPJam's side.

---

[API](https://skmtc.net/mcpjam/apis/mcpjam-api.md) · [All operations](https://skmtc.net/mcpjam/apis/mcpjam-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mcpjam/mcpjam-api/revisions/d3adfe49fbbf/schema)
