---
title: "Rename or move a file within an application"
method: PATCH
path: "/v2/apps/{appId}/files"
tags: ["File Manager"]
---

# Rename or move a file within an application

`PATCH /v2/apps/{appId}/files`

Renames the file at `path` to `to`. Both paths must be valid and distinct.

Requires the workspace Maintainer or Administrator role (or ownership) when called against a workspace-shared application.

## Path parameters

- `appId` string, required

## Request body

- object
  - `path` string, required — Absolute path of the source file.
  - `to` string, required — Absolute path of the destination file.

## Response `200`

File renamed.

- object
  - `status` 'success', required

## Other responses

- `400` — Path validation failed or the rename operation failed.
- `401` — The Authorization header is missing, malformed, or the credentials are not valid.
- `403` — The workspace member does not have the required permission for this endpoint.
- `404` — The target application could not be found, or the caller is not a member of the workspace.
- `413` — The request body is larger than the maximum allowed size (100MB).
- `429` — The authenticated user or API key exceeded the global request budget.
- `500` — An unexpected error occurred while processing the request.

---

[API](https://skmtc.dev/squarecloud/apis/square-cloud-api.md) · [All operations](https://skmtc.dev/squarecloud/apis/square-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/squarecloud/square-cloud-api/revisions/54b7733a6b95/schema)
