---
updatedAt: 2026-04-21T03:46:21.000Z
agentTools:
  projectIndex: https://help.rainforestqa.com/llms.txt
---

# Update a site-environment

Update a site-environment

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Rainforest API Documentation",
    "description": "Nearly all interactions done on in Rainforest can be done in via the API.<br/><br/>Find your API Token (for the CLIENT_TOKEN header field) on the <a href=\"https://app.rainforestqa.com/settings/integrations\">integration settings</a> page.",
    "version": "1"
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "site_environments",
      "description": "Operations about site_environments"
    }
  ],
  "paths": {
    "/1/site_environments/{site_environment_id}": {
      "put": {
        "summary": "Update a site-environment",
        "description": "Update a site-environment",
        "parameters": [
          {
            "in": "path",
            "name": "site_environment_id",
            "description": "A site environment ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/put-site-environment"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Site-environment updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmartFolder"
                }
              }
            }
          },
          "400": {
            "description": "Could not update site-environment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Site-environment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "tags": [
          "site_environments"
        ],
        "operationId": "put-site-environment",
        "x-rdme-order": 11
      }
    }
  },
  "servers": [
    {
      "url": "//app.rainforestqa.com/api"
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "CLIENT_TOKEN",
        "in": "header"
      }
    },
    "schemas": {
      "RunTestBrowserStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "overridden_results": {
            "$ref": "#/components/schemas/OverriddenResult"
          },
          "credit_cost": {
            "type": "string"
          }
        }
      },
      "OverriddenResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "job_group_id": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserLite"
          }
        }
      },
      "UserLite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "api_token": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "link_state": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "rainforest",
              "user"
            ]
          }
        },
        "description": "Connection model"
      },
      "Tests_Lite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "test_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "wisp": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "prompt_credentials": {
            "type": "string"
          },
          "ai_mode": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "real_cost_to_run": {
            "type": "string"
          },
          "owner_id": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "deleted": {
            "type": "string"
          },
          "feature_id": {
            "type": "string"
          }
        }
      },
      "RunSuperLite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "An error message describing what went wrong"
          }
        },
        "required": [
          "error"
        ],
        "description": "Error model"
      },
      "SmartFolder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "filter",
              "tag"
            ]
          },
          "logic": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "example": [
              {
                "expression": {
                  "tag": "foo",
                  "inclusive": true
                }
              },
              {
                "operation": "and"
              },
              {
                "expression": {
                  "tag": "bar",
                  "inclusive": false
                }
              },
              {
                "operation": "or"
              },
              {
                "expression": {
                  "tag": "baz",
                  "inclusive": true
                }
              }
            ]
          },
          "filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Filter"
            },
            "example": [
              {
                "owner_id": 117
              },
              {
                "priority": "P1"
              }
            ]
          },
          "test_count": {
            "type": "integer",
            "format": "int32"
          },
          "tests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tests_Index"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "title",
          "type",
          "logic",
          "filters",
          "updated_at"
        ],
        "description": "SmartFolder model"
      },
      "Filter": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "step_query": {
            "type": "string"
          },
          "owner_id": {
            "type": "integer",
            "format": "int32"
          },
          "result": {
            "type": "string",
            "enum": [
              "passed",
              "failed"
            ]
          },
          "feature_id": {
            "type": "integer",
            "format": "int32"
          },
          "run_group_id": {
            "type": "integer",
            "format": "int32"
          },
          "priority": {
            "type": "string",
            "enum": [
              "P1",
              "P2",
              "P3",
              "not_prioritized"
            ]
          },
          "embedded": {
            "type": "boolean"
          },
          "state": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "draft"
            ]
          },
          "site_id": {
            "type": "integer",
            "format": "int32"
          },
          "category": {
            "type": "string",
            "enum": [
              "site",
              "app"
            ]
          },
          "variable": {
            "type": "string"
          },
          "exploratory_run_id": {
            "type": "integer",
            "format": "int32"
          },
          "test_language": {
            "type": "string",
            "enum": [
              "plain_english",
              "rainforest_test_language"
            ]
          },
          "has_comments": {
            "type": "boolean"
          }
        }
      },
      "Tests_Index": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "test_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "wisp": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "prompt_credentials": {
            "type": "string"
          },
          "ai_mode": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "site_id": {
            "type": "string"
          },
          "priority": {
            "type": "string"
          },
          "start_uri": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "browsers": {
            "$ref": "#/components/schemas/RunTestBrowserStatus"
          },
          "tags": {
            "type": "string"
          },
          "frontend_url": {
            "type": "string"
          },
          "rfml_id": {
            "type": "string"
          },
          "exploratory_run_id": {
            "type": "string"
          },
          "initial_redirect_behavior": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "reroute_geo": {
            "type": "string",
            "description": "Deprecated: please use `connection.id` instead"
          },
          "connection": {
            "$ref": "#/components/schemas/Connection"
          },
          "atc_settings": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/UserLite"
          },
          "last_updated_by": {
            "$ref": "#/components/schemas/UserLite"
          },
          "updated_at": {
            "type": "string"
          },
          "archived_at": {
            "type": "string"
          },
          "deleted": {
            "type": "string"
          },
          "attached_to": {
            "$ref": "#/components/schemas/Tests_Lite"
          },
          "dry_run_url": {
            "type": "string"
          },
          "last_run": {
            "$ref": "#/components/schemas/RunSuperLite"
          },
          "feature_id": {
            "type": "string"
          },
          "has_wisp": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "coverage_summary": {
            "type": "string"
          },
          "used_in_snippets_count": {
            "type": "string"
          },
          "used_in_tests_count": {
            "type": "string"
          },
          "used_in_archived_snippets_count": {
            "type": "string"
          },
          "used_in_archived_tests_count": {
            "type": "string"
          },
          "self_healed_at": {
            "type": "string"
          },
          "last_run_test": {
            "type": "object",
            "properties": {
              "self_healed": {
                "type": "string"
              },
              "rescued": {
                "type": "string"
              }
            }
          }
        }
      },
      "put-site-environment": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "New URL of the site in this environment"
          }
        },
        "description": "Update a site-environment"
      }
    }
  }
}
```