---
title: "File Environment In Folder"
method: PUT
path: "/api/work-runtimes/environments/{environment_id}/space"
tags: ["work-runtimes"]
---

# File Environment In Folder

`PUT /api/work-runtimes/environments/{environment_id}/space`

## Request

- Base URL: `https://app.thinqos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.thinqos.com/api/work-runtimes/environments/{environment_id}/space`
- Auth: none declared

File an environment in a folder, including one currently filed in none.

Separate from PATCH on purpose: PATCH loads through the normal access
check, which returns nothing for an environment with no folder, so it can
never repair one. This is the only door that can.

## Path parameters

- `environment_id` string, uuid, required

## Headers

- `x-impersonate-identity-id` string, nullable

## Request body

- FileRuntimeEnvironmentRequest
  - `library_id` string, uuid, required

## Response `200`

Successful Response

- RuntimeEnvironmentResponse
  - `id` string, uuid, required
  - `owner_identity_id` string, uuid, required
  - `library_id` string, uuid, nullable
  - `runtime_kind` string, required
  - `name` string, required
  - `environment_ref` string, required
  - `registration_id` string, uuid, nullable
  - `status` string, required
  - `config` object, required
  - `policy_defaults` object, required
  - `setup_recipe` object, nullable
  - `setup_recipe_version` integer
  - `setup_recipe_fingerprint` string, nullable
  - `repository` DevelopmentRepositoryResponse
    - `provider` string, required
    - `repository_id` string, required
    - `owner` string, required
    - `name` string, required
    - `base_branch` string, required
    - `installation_instance_id` string, uuid, nullable
    - `manager_identity_id` string, uuid, nullable
    - `lifecycle_profile_id` string, uuid, nullable
  - `setup_status` string, required
  - `health_status` string, required
  - `setup_issues` string[], required
  - `next_action` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/thinqos/apis/thinqos-api.md) · [All operations](https://skmtc.dev/thinqos/apis/thinqos-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thinqos/apis/thinqos-api/revisions/ce2c2ce318b1?raw)
