---
title: "Update a file"
method: PATCH
path: "/dam/folders/{folder_id}/files/{file_id}"
tags: ["DAM: Folders: Files"]
---

# Update a file

`PATCH /dam/folders/{folder_id}/files/{file_id}`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/folders/{folder_id}/files/{file_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/folders/:folder_id/files/:file_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `folder_id` string, required
- `file_id` string, required

## Request body

- object
  - `data` object, required
    - `type` string: Resource Type
    - `id` string: Resource Id
    - `attributes` object: Attributes
      - `name` string: Name (must be unqiue within the same folder)

## Response `200`

updated

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
