---
title: "Update an uploaded file's metadata"
method: PATCH
path: "/uploads/{filename}"
tags: ["Documents"]
---

# Update an uploaded file's metadata

`PATCH /uploads/{filename}`

## Request

- Base URL: `https://api.app.lastaccountingcompany.com/portal`
- URL: `https://api.app.lastaccountingcompany.com/portal/uploads/{filename}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/docs/uploads/:filename/patch.ts> (a function with typed inputs; its response is checked against the schema)

Renames the file's display name and/or attaches a context note for the accounting agent. Requires a write-scoped key.

## Path parameters

- `filename` string, required

## Request body

- object
  - `customer_id` string: Target company. Optional for API keys.
  - `display_name` string
  - `context_note` string

## Response `200`

Updated file metadata.

- object
  - `customer_id` string
  - `file` object
  - `event_id` string

## Other responses

- `401`: Missing or invalid bearer token.
- `403`: Insufficient scope or role — e.g. a read-scoped key on a mutating method, or an API key on an admin/approver-only endpoint.

---

[API](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api.md) - [All operations](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/revisions/52e277b4f031?raw)
