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.

Create a file upload session
file.create(FileCreateParams**kwargs) -> FileCreateResponse
POST/v1/files
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.

mime_type: str

MIME type of the file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
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.

mime_type: str

MIME type of the file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
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.

mime_type: str

MIME type of the file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
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.

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.

mime_type: str

MIME type of the file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
object: str

The object type, always "list".

total_count: int

Total number of matching files.

minimum0
maximum9007199254740991
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.

mime_type: str

MIME type of the file.

size_bytes: int

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: Literal["PENDING", "COMPLETED", "CANCELLED", "EXPIRED"]

Current upload status of the file.

One of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
class FileURLResponse:
expires_at: str

When the download URL expires.

url: str

Temporary download URL for the file.