DELETE /api/v1/cloud/environments/{environment_id}
Deletes an Environment and returns a deletion confirmation. If the Environment is still referenced by Sessions or tool calls, the API returns 409 and you should archive it instead.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
environment_id | string | Yes | Environment unique identifier (with the env_ prefix) |
Example request
Example response
HTTP 200 OK"type": "environment_deleted" in the response body.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized for this resource |
| 404 | not_found_error | Environment with the given ID does not exist |
| 409 | invalid_request_error | Environment is still referenced by Sessions or tool calls |
Related
Cloud environment setup
Choose the container, network, and dependencies your agent runs in.