---
title: "Update a file"
method: PUT
path: "/Files/{FileId}"
tags: ["Files"]
---

# Update a file

`PUT /Files/{FileId}`

Updates file properties of a single file

## Path parameters

- `FileId` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- FileObject
  - `Name` string — File Name
  - `MimeType` string — MimeType of the file (image/png, image/jpeg, application/pdf, etc..)
  - `Size` integer — Numeric value in bytes
  - `CreatedDateUtc` string — Created date in UTC
  - `UpdatedDateUtc` string — Updated date in UTC
  - `User` User
    - `Id` string, uuid, required — Xero identifier
    - `Name` string — Key is Name, but returns Email address of user who created the file
    - `FirstName` string — First name of user
    - `LastName` string — Last name of user
    - `FullName` string — Last name of user
  - `Id` string, uuid — File object's UUID
  - `FolderId` string, uuid — Folder relation object's UUID

## Response `200`

A successful request

- FileObject
  - `Name` string — File Name
  - `MimeType` string — MimeType of the file (image/png, image/jpeg, application/pdf, etc..)
  - `Size` integer — Numeric value in bytes
  - `CreatedDateUtc` string — Created date in UTC
  - `UpdatedDateUtc` string — Updated date in UTC
  - `User` User
    - `Id` string, uuid, required — Xero identifier
    - `Name` string — Key is Name, but returns Email address of user who created the file
    - `FirstName` string — First name of user
    - `LastName` string — Last name of user
    - `FullName` string — Last name of user
  - `Id` string, uuid — File object's UUID
  - `FolderId` string, uuid — Folder relation object's UUID

## Other responses

- `400` — invalid input, object invalid

## Changes

- **2024-06-18** `bb86098f8245` — 3 breaking, 17 info
  - added the new required `header` request parameter `xero-tenant-id` to all path's operations
  - the request's body type/format changed from ``/`` to `object`/``
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the new optional `header` request parameter `Idempotency-Key`
  - …16 more
- **2024-06-18** `d277dd2accff` — 2 breaking, 17 warning
  - the request's body type/format changed from `object`/`` to ``/``
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - deleted the `header` request parameter `Idempotency-Key`
  - removed the request property `CreatedDateUtc`
  - …15 more
- **2024-05-10** `d599b701a104` — 3 breaking, 17 info
  - added the new required `header` request parameter `xero-tenant-id` to all path's operations
  - the request's body type/format changed from ``/`` to `object`/``
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - added the new optional `header` request parameter `Idempotency-Key`
  - …16 more
- **2024-01-31** `fb29d2ec1038` — 1 breaking
  - request body became required

[Change history](https://skmtc.dev/xeroapi/apis/xero-files-api/changes/Files/:FileId/put.md)

---

[API](https://skmtc.dev/xeroapi/apis/xero-files-api.md) · [All operations](https://skmtc.dev/xeroapi/apis/xero-files-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/xeroapi/xero-files-api/revisions/52cdc688e428/schema)
