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.
| Header | Required | Description |
|---|
Authorization | Yes | Bearer <PAT> (admin scope required) |
Path parameters
| Parameter | Type | Required | Description |
|---|
environment_id | string | Yes | Environment 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
| HTTP | Type | Trigger |
|---|
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized to delete (admin permission required) |
| 404 | not_found_error | Environment 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.