---
title: "File data model"
url: "https://docs.unified.to/storage/file/model"
description: "The File data model object in Unified's File API: 19 fields, including created_at, updated_at and name, with types and enum values."
date: "2026-10-01T23:34:56.864Z"
updated: "2026-11-05T22:09:04.442Z"
---
# File data model

Updated: November 5, 2026

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/storage/integrations.md) page. 

| Field                      | Type                  | Required | Description                                                                                                                                             |
| -------------------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                         | string                | No       |                                                                                                                                                         |
| created\_at                | string (date-time)    | No       | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                |
| updated\_at                | string (date-time)    | No       | (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                                                                                                |
| name                       | string                | No       | The file or folder name, including the file's extension                                                                                                 |
| description                | string                | No       |                                                                                                                                                         |
| parent\_id                 | string                | No       |                                                                                                                                                         |
| user\_id                   | string                | No       | (reference to HrisEmployee)                                                                                                                             |
| size                       | number                | No       |                                                                                                                                                         |
| type                       | enum                  | No       | Whether this is a file or a folder Values: FILE, FOLDER                                                                                                 |
| mime\_type                 | string                | No       |                                                                                                                                                         |
| permissions                | StoragePermission\[\] | No       |                                                                                                                                                         |
| permissions\[\].user\_id   | string                | No       | (reference to HrisEmployee)                                                                                                                             |
| permissions\[\].group\_id  | string                | No       | (reference to HrisGroup)                                                                                                                                |
| permissions\[\].roles      | enum\[\]              | Yes      | Values: OWNER, READ, WRITE                                                                                                                              |
| permissions\[\].is\_hidden | boolean               | No       |                                                                                                                                                         |
| permissions\[\].is\_public | boolean               | No       |                                                                                                                                                         |
| download\_url              | string                | No       | 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                | No       |                                                                                                                                                         |
| data                       | string                | No       | base64 encoded file contents used to create/update only                                                                                                 |
| version                    | string                | No       |                                                                                                                                                         |
| web\_url                   | string                | No       |                                                                                                                                                         |
| references                 | StorageReference\[\]  | No       | The records the file is attached to (e.g. an invoice or a candidate), each by its id and type                                                           |
| references\[\].id          | string                | No       |                                                                                                                                                         |
| references\[\].type        | string                | No       |                                                                                                                                                         |
| references\[\].name        | string                | No       |                                                                                                                                                         |
| tags                       | string\[\]            | No       | labels                                                                                                                                                  |
| metadata                   | StorageMetadata\[\]   | No       |                                                                                                                                                         |
| metadata\[\].id            | string                | No       |                                                                                                                                                         |
| metadata\[\].slug          | string                | No       |                                                                                                                                                         |
| metadata\[\].value         | object                | No       |                                                                                                                                                         |
| metadata\[\].namespace     | string                | No       |                                                                                                                                                         |
| metadata\[\].format        | enum                  | No       | Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE\_SELECT, MULTIPLE\_SELECT, MEASUREMENT, PRICE, YES\_NO, CURRENCY, URL                       |
| metadata\[\].extra\_data   | object                | No       |                                                                                                                                                         |

## TypeScript

```typescript
export type StorageFile = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	name?: string; // The file or folder name, including the file's extension
	description?: string;
	parent_id?: string;
	user_id?: string; // (reference to HrisEmployee)
	size?: number;
	type?: 'FILE' | 'FOLDER'; // Whether this is a file or a folder
	mime_type?: string;
	permissions?: [];
	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?: []; // The records the file is attached to (e.g. an invoice or a candidate), each by its id and type
	tags?: string[]; // labels
	metadata?: [];
	raw?: any;
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodStorageFile = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	name: z.string().optional().describe("The file or folder name, including the file's extension"),
	description: z.string().optional(),
	parent_id: z.string().optional(),
	user_id: z.string().optional().describe("(reference to HrisEmployee)"),
	size: z.number().optional(),
	type: z.enum("FILE", "FOLDER").optional().describe("Whether this is a file or a folder"),
	mime_type: z.string().optional(),
	permissions: z.array().optional(),
	download_url: z.string().optional().describe("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: z.string().optional(),
	data: z.string().optional().describe("base64 encoded file contents used to create/update only"),
	version: z.string().optional(),
	web_url: z.string().optional(),
	references: z.array().optional().describe("The records the file is attached to (e.g. an invoice or a candidate), each by its id and type"),
	tags: z.array().optional().describe("labels"),
	metadata: z.array().optional(),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class StorageFileType(str, Enum):
	FILE = 'FILE'
	FOLDER = 'FOLDER'

@dataclasses.dataclass
class StorageFile:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The file or folder name, including the file's extension"""
	name: Optional[str]
	description: Optional[str]
	parent_id: Optional[str]
	"""(reference to HrisEmployee)"""
	user_id: Optional[str]
	size: Optional[int]
	"""Whether this is a file or a folder"""
	type: Optional[StorageFileType]
	mime_type: Optional[str]
	permissions: Optional[PropertyStorageFilePermissions]
	"""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."""
	download_url: Optional[str]
	hash: Optional[str]
	"""base64 encoded file contents used to create/update only"""
	data: Optional[str]
	version: Optional[str]
	web_url: Optional[str]
	"""The records the file is attached to (e.g. an invoice or a candidate), each by its id and type"""
	references: Optional[PropertyStorageFileReferences]
	"""labels"""
	tags: Optional[List[List[str]]]
	metadata: Optional[PropertyStorageFileMetadata]

```
