---
title: "Rename a directory. Deprecated, use \"file-actions/move\""
method: PATCH
path: "/user/dirs"
tags: ["user APIs"]
deprecated: true
---

# Rename a directory. Deprecated, use "file-actions/move"

`PATCH /user/dirs`

> **Deprecated.**

Rename a directory for the logged in user. The rename is allowed for empty directory or for non empty local directories, with no virtual folders inside

## Query parameters

- `path` string, required
- `target` string, required

## Response `200`

successful operation

- ApiResponse
  - `message` string — message, can be empty
  - `error` string — error description if any

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error
- `default` — Unexpected Error

---

[API](https://skmtc.net/kanton-bern/apis/sftpgo.md) · [All operations](https://skmtc.net/kanton-bern/apis/sftpgo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kanton-bern/sftpgo/versions/d8d616a479b0/schema)
