---
title: "Move or rename a Files item"
method: PATCH
path: "/tally/files/{fileId}"
tags: ["Tally Files"]
---

# Move or rename a Files item

`PATCH /tally/files/{fileId}`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/tally/files/{fileId}`
- Auth: HTTP bearer

Moves one authorized human-facing file to a firm/company location and folder, or renames it. Duplicate destination names receive a unique suffix.

## Path parameters

- `fileId` string, uuid, required

## Request body

- union
  - object
    - `action` 'move', required
    - `companyOrganizationId` string, uuid, nullable, required
    - `folderPath` string, nullable
  - object
    - `action` 'rename', required
    - `fileName` string, required

## Response `200`

Updated Files item

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
