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
client.file.create(FileCreateParams { filename, mimeType, sizeBytes, purpose } body, RequestOptionsoptions?): FileCreateResponse { id, completedAt, createdAt, 7 more }
POST/v1/files
Complete a file upload
client.file.complete(stringid, FileCompleteParams { md5 } body, RequestOptionsoptions?): FileCompleteResponse { id, completedAt, createdAt, 5 more }
POST/v1/files/{id}/complete
Retrieve a file
client.file.retrieve(stringid, RequestOptionsoptions?): FileRetrieveResponse { id, completedAt, createdAt, 5 more }
GET/v1/files/{id}
List files
client.file.list(FileListParams { limit, offset } query?, RequestOptionsoptions?): FileListResponse { data, object, totalCount }
GET/v1/files
Get a file download URL
client.file.url(stringid, RequestOptionsoptions?): FileURLResponse { expiresAt, url }
GET/v1/files/{id}/url
Cancel a file upload
client.file.cancel(stringid, FileCancelParams { body } params?, RequestOptionsoptions?): FileCancelResponse { id, completedAt, createdAt, 5 more }
POST/v1/files/{id}/cancel
ModelsExpand Collapse
FileCancelResponse { id, completedAt, createdAt, 5 more }
id: string

Unique identifier for the file.

completedAt: string | null

When the file upload was completed.

createdAt: string

When the file upload session was created.

expiresAt: string | null

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

filename: string

Original filename.

mimeType: string

MIME type of the file.

sizeBytes: number

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: "PENDING" | "COMPLETED" | "CANCELLED" | "EXPIRED"

Current upload status of the file.

Accepts one of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
FileCompleteResponse { id, completedAt, createdAt, 5 more }
id: string

Unique identifier for the file.

completedAt: string | null

When the file upload was completed.

createdAt: string

When the file upload session was created.

expiresAt: string | null

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

filename: string

Original filename.

mimeType: string

MIME type of the file.

sizeBytes: number

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: "PENDING" | "COMPLETED" | "CANCELLED" | "EXPIRED"

Current upload status of the file.

Accepts one of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
FileCreateResponse { id, completedAt, createdAt, 7 more }
id: string

Unique identifier for the file.

completedAt: string | null

When the file upload was completed.

createdAt: string

When the file upload session was created.

expiresAt: string | null

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

filename: string

Original filename.

mimeType: string

MIME type of the file.

sizeBytes: number

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: "PENDING" | "COMPLETED" | "CANCELLED" | "EXPIRED"

Current upload status of the file.

Accepts one of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
uploadHeaders: Record<string, string>

Headers to include in the upload request.

uploadUrl: string

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

FileListResponse { data, object, totalCount }
data: Array<Data>

Array of file objects for the current page.

id: string

Unique identifier for the file.

completedAt: string | null

When the file upload was completed.

createdAt: string

When the file upload session was created.

expiresAt: string | null

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

filename: string

Original filename.

mimeType: string

MIME type of the file.

sizeBytes: number

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: "PENDING" | "COMPLETED" | "CANCELLED" | "EXPIRED"

Current upload status of the file.

Accepts one of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
object: string

The object type, always "list".

totalCount: number

Total number of matching files.

minimum0
maximum9007199254740991
FileRetrieveResponse { id, completedAt, createdAt, 5 more }
id: string

Unique identifier for the file.

completedAt: string | null

When the file upload was completed.

createdAt: string

When the file upload session was created.

expiresAt: string | null

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

filename: string

Original filename.

mimeType: string

MIME type of the file.

sizeBytes: number

File size in bytes.

minimum-9007199254740991
maximum9007199254740991
status: "PENDING" | "COMPLETED" | "CANCELLED" | "EXPIRED"

Current upload status of the file.

Accepts one of the following:
"PENDING"
"COMPLETED"
"CANCELLED"
"EXPIRED"
FileURLResponse { expiresAt, url }
expiresAt: string

When the download URL expires.

url: string

Temporary download URL for the file.