Skip to main content
DELETE
Delete an environment
Tools built there, and every version, are kept.
  • A login, API key or webhook limited to it alone can be used nowhere, or gets no events, until it is edited. It is never widened.
  • Deleting the last environment besides production turns environments off. A login or key limited only to deleted environments still can be used nowhere until it is edited.
  • Production can’t be deleted.
  • An API key or MCP URL limited to environments deletes only one of its own, and the last one besides production only when it may also be used in production, since that turns Protect production off.
  • An API key or connected agent can’t delete an environment that turns off categories, sites or tools for them, which is refused with forbidden.
  • Callers: an API key, an MCP OAuth token or a Dashboard session.
  • Permission: team:manage; an API key also needs team:manage.
  • Effect: Removes or replaces something, and can’t be undone.
  • Errors: environment_not_found, environments_unavailable, and the errors any request can get.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

key
string
required

a string matching the pattern ^a-z [blocked]?$

Response

The team's environments

The team's environments, production first; empty before it adds one

data
object[]
required