---
title: "Change an environment filesystem grant"
method: PATCH
path: "/api/v1/agent-environments/{environmentId}/roots"
tags: ["Agent environments"]
---

# Change an environment filesystem grant

`PATCH /api/v1/agent-environments/{environmentId}/roots`

## Path parameters

- `environmentId` string, required

## Request body

- object
  - `filesystemGrant` union, required
    - object
      - `mode` 'selected_roots', required
      - `roots` string[], required
    - object
      - `mode` 'all_user_files', required

## Response `200`

Successful response. Stable response schemas are documented in workflow guides when available.

- unknown

## Other responses

- `400` — Invalid request.
- `401` — Missing or invalid authentication.
- `500` — Unexpected server error.

---

[API](https://skmtc.dev/layernorm/apis/overlay-web-api.md) · [All operations](https://skmtc.dev/layernorm/apis/overlay-web-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/layernorm/overlay-web-api/revisions/a64546f5bde3/schema)
