Skip to content
Skip to Content

Delete an environment

DELETE
/environments/{environmentId}

Deletes the environment with its own variables. Production cannot be deleted, nor an environment that still has services: delete them first. Project admins only.

This loses data or replaces what runs; MCP asks for confirmation first.

Authorization

bearer
headerAuthorizationBearer <token>

An API key (opk_…) or a CLI token (opc_…).

Path parameters

environmentId*string

Response body

Done.

Example request
curl -X DELETE "https://openpanel.sh/api/v1/environments/$ENVIRONMENT_ID" \  -H "Authorization: Bearer $OPENPANEL_TOKEN"
Example response
Empty