---
title: "Update a file"
method: PUT
path: "/storage/{connection_id}/file/{id}"
tags: ["storage", "file"]
---

# Update a file

`PUT /storage/{connection_id}/file/{id}`

## Request

- Base URL: `http://api.unified.to`
- URL: `http://api.unified.to/storage/{connection_id}/file/{id}`
- Auth: API key in header `authorization`

## Path parameters

- `connection_id` string, required
- `id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- StorageFile
  - `id` string
  - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string
  - `description` string
  - `parent_id` string
  - `user_id` string: (reference to HrisEmployee)
  - `size` number
  - `type` 'FILE' | 'FOLDER'
  - `mime_type` string
  - `permissions` StoragePermission[]
    - `user_id` string: (reference to HrisEmployee)
    - `group_id` string: (reference to HrisGroup)
    - `roles` string[], required
    - `is_hidden` boolean
    - `is_public` boolean
  - `download_url` string: This link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url.
  - `hash` string
  - `data` string: base64 encoded file contents used to create/update only
  - `version` string
  - `web_url` string
  - `references` StorageReference[]
    - `id` string
    - `type` string
    - `name` string
  - `tags` string[]: labels
  - `metadata` StorageMetadata[]
    - `id` string
    - `slug` string
    - `value` unknown
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` unknown
  - `raw` unknown

## Response `200`

Successful

- StorageFile
  - `id` string
  - `created_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string
  - `description` string
  - `parent_id` string
  - `user_id` string: (reference to HrisEmployee)
  - `size` number
  - `type` 'FILE' | 'FOLDER'
  - `mime_type` string
  - `permissions` StoragePermission[]
    - `user_id` string: (reference to HrisEmployee)
    - `group_id` string: (reference to HrisGroup)
    - `roles` string[], required
    - `is_hidden` boolean
    - `is_public` boolean
  - `download_url` string: This link expires after 1 hour. When you need to retrieve the contents of a file, call the "Retrieve a file" endpoint again to get a new download_url.
  - `hash` string
  - `data` string: base64 encoded file contents used to create/update only
  - `version` string
  - `web_url` string
  - `references` StorageReference[]
    - `id` string
    - `type` string
    - `name` string
  - `tags` string[]: labels
  - `metadata` StorageMetadata[]
    - `id` string
    - `slug` string
    - `value` unknown
    - `namespace` string
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL'
    - `extra_data` unknown
  - `raw` unknown

---

[API](https://skmtc.dev/unified/apis/unified-to-api-2.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api-2/revisions/7a38bdd7f089?raw)
