Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

DELETE /v1/environments/{environment_id} Permanently deletes the specified environment. The operation is irreversible and requires admin permissions.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT> (admin scope required)

Path parameters

ParameterTypeRequiredDescription
environment_idstringYesEnvironment unique identifier (with the env_ prefix)

Request body

No request body.

Example request

curl -s -X DELETE 'https://openapi.qoder.sh/api/v1/cloud/environments/env_019e3bb39b6774d8878cd0b9d237574b' \
  -H "Authorization: Bearer $QODER_PAT"

Example response

A successful request returns an empty body with HTTP status 204. When the caller lacks permission, the response is:
{
  "type": "error",
  "error": {
    "type": "permission_error",
    "message": "You do not have permission to access this resource."
  }
}

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
403permission_errorNot authorized to delete (admin permission required)
404not_found_errorEnvironment with the given ID does not exist
See Errors for the full error envelope.

Notes

  • This endpoint requires an admin-level PAT. Standard users receive a 403.
  • Archive the environment via POST /v1/environments/{environment_id}/archive before deletion when possible.
  • Deletion may fail if active sessions still reference the environment.