---
title: "Agent Update File"
method: PATCH
path: "/agent/files/{doc_id}"
---

# Agent Update File

`PATCH /agent/files/{doc_id}`

## Request

- Base URL: `https://app.wunel.com` (the document declares no server; this is the origin it was published from)
- URL: `https://app.wunel.com/agent/files/{doc_id}`
- Auth: none declared

Rename and/or move a file. Only fields you send are applied.

`workspace_id` moves the file to another workspace: the principal must be
able to edit there too, and the page keeps its id, so its block-level
authorship, comments, share link and grants come with it.

## Path parameters

- `doc_id` string, required

## Request body

- AgentUpdateRequest
  - `name` string, nullable
  - `folder_id` string, nullable
  - `parent_id` string, nullable
  - `workspace_id` string, nullable
  - `update_links` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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