Skip to content

File

Files are used to upload documents via presigned URLs. After uploading and completing a file, link it to resources through their own APIs (e.g. attach a transcript to a meeting). See File uploads for the full upload flow and supported purposes. For meeting transcript attachments, see Uploading meeting transcripts. Not every retrievable file is listable: files uploaded through the app and synced chat attachments are fetchable by id (GET /v1/files/{id}, GET /v1/files/{id}/url, or a CRM record’s $files relationship) but never appear in GET /v1/files.

Create a file upload session
file.create(FileCreateParams**kwargs) -> FileCreateResponse
POST/v1/files
Import a file from Google Drive, OneDrive or SharePoint
file.create_from_storage(FileCreateFromStorageParams**kwargs) -> FileCreateFromStorageResponse
POST/v1/files/import
Complete a file upload
file.complete(strid, FileCompleteParams**kwargs) -> FileCompleteResponse
POST/v1/files/{id}/complete
Retrieve a file
file.retrieve(strid) -> FileRetrieveResponse
GET/v1/files/{id}
List files
file.list(FileListParams**kwargs) -> FileListResponse
GET/v1/files
Get a file download URL
file.url(strid) -> FileURLResponse
GET/v1/files/{id}/url
Cancel a file upload
file.cancel(strid, FileCancelParams**kwargs) -> FileCancelResponse
POST/v1/files/{id}/cancel
ModelsExpand Collapse
class FileCancelResponse: …
id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

class FileCompleteResponse: …
id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

class FileCreateFromStorageResponse: …
id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

class FileCreateResponse: …
id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
upload_headers: Dict[str, str]

Headers to include in the upload request.

upload_url: str

Upload URL. Upload the file bytes directly to this URL.

web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

class FileListResponse: …
data: List[Data]

Array of file objects for the current page.

id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

object: str

The object type, always "list".

total_count: int

Total number of matching files.

minimum0
maximum9007199254740991
truncated: Optional[bool]

Present and true when a Drive tree was cut off at 1000 rows. totalCount is then the cap, not the size of the tree.

class FileRetrieveResponse: …
id: str

Unique identifier for the file.

completed_at: Optional[str]

When the file upload was completed.

created_at: str

When the file upload session was created.

expires_at: Optional[str]

When the upload session expires. Null once completed, cancelled, or expired.

filename: str

Original filename.

kind: Optional[Literal["file", "folder"]]

Whether the item is a file or a folder. Null when the response was built without that column.

One of the following:
"file"
"folder"
mime_type: str

MIME type of the file.

modified_at: Optional[str]

When the storage last modified this item. Null for a non-storage file, and for a storage item whose modified time has not been stored.

parent_id: Optional[str]

The storage folder this item sits in, or null for a top-level item or a non-storage file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
source: Optional[Literal["googleDrive", "microsoftDrive"]]

Where the file came from. googleDrive for a linked Google Drive item, microsoftDrive for a linked OneDrive or SharePoint item. Null for every other file.

One of the following:
"googleDrive"
"microsoftDrive"
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
web_url: Optional[str]

A link that opens this item in Google Drive, OneDrive or SharePoint. Null for a non-storage file.

class FileURLResponse: …
expires_at: str

When the download URL expires.

url: str

Temporary download URL for the file.