File data model

Updated:

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoThe file or folder name, including the file's extension
descriptionstringNo
parent_idstringNo
user_idstringNo(reference to HrisEmployee)
sizenumberNo
typeenumNoWhether this is a file or a folder Values: FILE, FOLDER
mime_typestringNo
permissionsStoragePermission[]No
permissions[].user_idstringNo(reference to HrisEmployee)
permissions[].group_idstringNo(reference to HrisGroup)
permissions[].rolesenum[]YesValues: OWNER, READ, WRITE
permissions[].is_hiddenbooleanNo
permissions[].is_publicbooleanNo
download_urlstringNoThis 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.
hashstringNo
datastringNobase64 encoded file contents used to create/update only
versionstringNo
web_urlstringNo
referencesStorageReference[]NoThe records the file is attached to (e.g. an invoice or a candidate), each by its id and type
references[].idstringNo
references[].typestringNo
references[].namestringNo
tagsstring[]Nolabels
metadataStorageMetadata[]No
metadata[].idstringNo
metadata[].slugstringNo
metadata[].valueobjectNo
metadata[].namespacestringNo
metadata[].formatenumNoValues: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo

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

Zod
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]
Are we missing anything? Let us know
Was this page helpful?