Create an environment
An environment beside production, such as staging, with its own services, variables and private network on each server, so its services may share names with production's. Project admins only.
bearerAuthorizationBearer <token>An API key (opk_…) or a CLI token (opc_…).
projectId*stringThe project's id.
Idempotency-Key?stringAny unique string up to 255 characters. Sending the same request again with it returns the first answer instead of creating twice.
length <= 255application/json- body
name*stringUp to 32 lowercase letters, digits and hyphens, such as staging. Once per project.
length <= 32Create an environment
application/json- response
id*stringuuidname*stringproduction*booleancurl -X POST "https://openpanel.sh/api/v1/projects/$PROJECT_ID/environments" \ -H "Authorization: Bearer $OPENPANEL_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "production": true}List a project's environments GET
Previous page
Delete an environment DELETE
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.