---
updatedAt: 2026-05-28T13:22:33.000Z
agentTools:
  projectIndex: https://api.help.mabl.com/llms.txt
---

# Remove environment

Remove an environment

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "mabl API",
    "description": "APIs for interacting with mabl services",
    "version": "0.563.3-2026-10-09.1791576280-jbaldassari-1791576682-SNAPSHOT"
  },
  "servers": [
    {
      "url": "https://api.mabl.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "bearerAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "ErrorResponseGeneric": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 100,
            "maximum": 599
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Environment": {
        "type": "object",
        "properties": {
          "created_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time environment created"
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Environment variables"
          },
          "use_link_agent": {
            "type": "boolean",
            "description": "If true, uses a Link Agent with specified link_agent_label for this environment"
          },
          "link_bypass_mabl_proxy": {
            "type": "boolean",
            "description": "If true, and if use_link_agent is true, test traffic will be routed directly via the Link Agent, bypassing the mabl HTTP proxy"
          },
          "description": {
            "type": "string",
            "description": "Environment description"
          },
          "page_load_wait": {
            "type": "string",
            "default": "NORMAL",
            "enum": [
              "FAST",
              "NORMAL",
              "SLOW",
              "SLOWER"
            ],
            "description": "Time to wait after page loads, if supported by the runtime."
          },
          "link_agent_labels": {
            "type": "array",
            "description": "If specified, and if use_link_agent is true, test traffic will be routed through Link agents with any of these labels",
            "items": {
              "type": "string"
            }
          },
          "workspace_id": {
            "type": "string",
            "description": "ID of workspace associated with environment"
          },
          "last_updated_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time environment last updated"
          },
          "name": {
            "type": "string",
            "description": "Environment display name"
          },
          "last_updated_by_id": {
            "type": "string",
            "description": "ID of user who last updated environment"
          },
          "id": {
            "type": "string",
            "description": "Environment ID"
          },
          "created_by_id": {
            "type": "string",
            "description": "ID of user who created environment"
          },
          "link_agent_label": {
            "deprecated": true,
            "type": "string",
            "description": "DEPRECATED - use link_agent_labels"
          }
        }
      }
    },
    "responses": {
      "ErrorResponse": {
        "description": "Unknown error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse401": {
        "description": "User not authenticated",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse403": {
        "description": "User not authorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse400": {
        "description": "Invalid or missing parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/environments/{id}": {
      "delete": {
        "summary": "Remove environment",
        "operationId": "removeEnvironment",
        "description": "Remove an environment",
        "responses": {
          "200": {
            "description": "Environment removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Environment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ErrorResponse400"
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse401"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse403"
          },
          "404": {
            "description": "Environment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseGeneric"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "description": "Environment ID",
            "required": true
          }
        ],
        "tags": [
          "Environment"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Environment"
    }
  ]
}
```