---
title: "Rename a workspace file"
method: PATCH
path: "/api/workspace/files/{file_id}"
tags: ["workspace"]
---

# Rename a workspace file

`PATCH /api/workspace/files/{file_id}`

Rename a file; it stays in its folder and conversation.

## Path parameters

- `file_id` string, required

## Request body

- RenameFileRequest
  - `name` string, required

## Response `200`

Successful Response

- WorkspaceFileItem
  - `id` string, required
  - `name` string, required
  - `path` string, required
  - `mime_type` string, required
  - `size_bytes` integer, required
  - `folder_id` string, nullable
  - `metadata` object
  - `origin` 'uploaded' | 'generated', required
  - `created_at` string, required
  - `expert_id` string, nullable

## Other responses

- `401` — Authentication required
- `404` — File not found
- `409` — A file with this name already exists here
- `422` — Validation Error

## Changes

- **2026-09-08** `aed958578b4c` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/workspace/files/:file_id/patch.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/revisions/a8f415ca28ec?raw)
