---
title: "Update a file"
method: PATCH
path: "/v2/files/{inodeId}"
tags: ["Files"]
---

# Update a file

`PATCH /v2/files/{inodeId}`

## Request

- Base URL: `https://api.sigmacomputing.com`
- URL: `https://api.sigmacomputing.com/v2/files/{inodeId}`
- Auth: HTTP bearer

Update a folder or document, such as a workbook, data model, or report.

  ### Usage notes
  - Retrieve the **inodeId** by calling the [/v2/files](https://help.sigmacomputing.com/reference/list-files) endpoint and using the `id` included in the response.
  - Specify a **parentId** to place the document within a folder. Retrieve the ID to use as a **parentId** by calling the [/v2/files](https://help.sigmacomputing.com/reference/list-files) endpoint and reviewing the `id` field in the response for files with a `type` of `folder`.
  - To restore a deleted folder or document, set the **restore** parameter to `true`.

## Path parameters

- `inodeId` string, required

## Request body

- object
  - `name` string
  - `description` string
  - `ownerId` string
  - `parentId` string: Folder ID to contain the folder or document
  - `restore` boolean

## Response `200`

The response body.

- FilesUpdateResponse200
  - `id` string, required
  - `urlId` string, required
  - `name` string, required
  - `type` 'workspace' | 'folder' | 'workbook' | 'dataset' | 'data-model' | 'sql' | 'worksheet' | 'dashboard' | 'template' | 'table' | 'symlink' | 'report', required
  - `parentId` string, required
  - `parentUrlId` string, required
  - `permission` 'create' | 'annotate' | 'organize' | 'explore' | 'view' | 'edit' | 'apply', required
  - `path` string, required
  - `badge` string, nullable, required
  - `isArchived` boolean, required
  - `description` string
  - `ownerId` string, nullable
  - `parentSourceUrlId` string: For a document deployed to a tenant organization, the `urlId` of the source document in the parent organization. Only present when the document was deployed from a parent organization. The source document can be a workbook, template, data model, dataset, or report.
  - `createdBy` string, required: The identifier of the user who created this object.
  - `updatedBy` string, required: The identifier of the user or process that last updated this object.
  - `createdAt` string, date-time, required: When the object was created.
  - `updatedAt` string, date-time, required: When the object was last updated.

---

[API](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api.md) - [All operations](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sigmacomputing/apis/sigma-rest-api/revisions/fb6036208c49?raw)
