# File
## Create
**post** `/v1/files`
Creates a new file upload session and returns an upload URL.
After uploading the file bytes to `uploadUrl`, call `POST /v1/files/{id}/complete` to finalize the upload. Optionally pass `purpose` to validate MIME type and size constraints at creation time. See [File uploads](/using-the-api/file-uploads/) for the full upload flow, supported purposes, and size limits. If you are uploading a meeting transcript, see [Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/) for the follow-up meeting attachment flow.
**[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
### Body Parameters
- `filename: string`
Original filename.
- `mimeType: string`
MIME type of the file. Must be allowed for the given purpose (if specified).
- `sizeBytes: number`
Expected file size in bytes. Maximum 512 MB.
- `purpose: optional "meeting_transcript" or "knowledge_user" or "knowledge_workspace"`
Optional validation hint. When provided, the server enforces purpose-specific MIME type and file size constraints. Use `meeting_transcript` for files that will be attached to a meeting as its transcript. Use `knowledge_user` or `knowledge_workspace` to add the file to the authenticated user's or workspace's Knowledge, making it available to the AI assistant. Not persisted or returned in responses.
- `"meeting_transcript"`
- `"knowledge_user"`
- `"knowledge_workspace"`
### Returns
- `FileCreateResponse = object { id, completedAt, createdAt, 7 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
- `uploadHeaders: map[string]`
Headers to include in the upload request.
- `uploadUrl: string`
Upload URL. Upload the file bytes directly to this URL.
### Example
```http
curl https://api.lightfield.app/v1/files \
-H 'Content-Type: application/json' \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY" \
-d '{
"filename": "x",
"mimeType": "mimeType",
"sizeBytes": 1
}'
```
## Complete
**post** `/v1/files/{id}/complete`
Finalizes an upload after the file bytes have been uploaded.
If an optional `md5` hex digest is provided, the server validates the checksum before marking the file as completed.
**[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
### Path Parameters
- `id: string`
Unique identifier of the file to complete.
### Body Parameters
- `md5: optional string`
Optional MD5 hex digest of the uploaded file for checksum verification.
### Returns
- `FileCompleteResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### Example
```http
curl https://api.lightfield.app/v1/files/$ID/complete \
-H 'Content-Type: application/json' \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY" \
-d '{}'
```
## Retrieve
**get** `/v1/files/{id}`
Retrieves a single file by its ID.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
### Path Parameters
- `id: string`
Unique identifier of the file to retrieve.
### Returns
- `FileRetrieveResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### Example
```http
curl https://api.lightfield.app/v1/files/$ID \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY"
```
## List
**get** `/v1/files`
Returns a paginated list of files in your workspace. Use `offset` and `limit` to paginate through results. See [List endpoints](/using-the-api/list-endpoints/) for more information about pagination.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Search
### Query Parameters
- `limit: optional number`
Maximum number of records to return. Defaults to 25, maximum 25.
- `offset: optional number`
Number of records to skip for pagination. Defaults to 0.
### Returns
- `FileListResponse = object { data, object, totalCount }`
- `data: array of object { id, completedAt, createdAt, 5 more }`
Array of file objects for the current page.
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
- `object: string`
The object type, always `"list"`.
- `totalCount: number`
Total number of matching files.
### Example
```http
curl https://api.lightfield.app/v1/files \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY"
```
## URL
**get** `/v1/files/{id}/url`
Returns a temporary download URL for the file. Only available for files in `COMPLETED` status.
**[Required scope](/using-the-api/scopes/):** `files:read`
**[Rate limit category](/using-the-api/rate-limits/):** Read
### Path Parameters
- `id: string`
Unique identifier of the file to download.
### Returns
- `FileURLResponse = object { expiresAt, url }`
- `expiresAt: string`
When the download URL expires.
- `url: string`
Temporary download URL for the file.
### Example
```http
curl https://api.lightfield.app/v1/files/$ID/url \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY"
```
## Cancel
**post** `/v1/files/{id}/cancel`
Cancels a pending upload by transitioning the file to `CANCELLED`. Only files in `PENDING` status can be cancelled. **[Required scope](/using-the-api/scopes/):** `files:create`
**[Rate limit category](/using-the-api/rate-limits/):** Write
### Path Parameters
- `id: string`
Unique identifier of the file to cancel.
### Body Parameters
- `body: optional object { }`
### Returns
- `FileCancelResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### Example
```http
curl https://api.lightfield.app/v1/files/$ID/cancel \
-X POST \
-H 'Lightfield-Version: 2026-03-01' \
-H "Authorization: Bearer $API_KEY"
```
## Domain Types
### File Cancel Response
- `FileCancelResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### File Complete Response
- `FileCompleteResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### File Create Response
- `FileCreateResponse = object { id, completedAt, createdAt, 7 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
- `uploadHeaders: map[string]`
Headers to include in the upload request.
- `uploadUrl: string`
Upload URL. Upload the file bytes directly to this URL.
### File List Response
- `FileListResponse = object { data, object, totalCount }`
- `data: array of object { id, completedAt, createdAt, 5 more }`
Array of file objects for the current page.
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
- `object: string`
The object type, always `"list"`.
- `totalCount: number`
Total number of matching files.
### File Retrieve Response
- `FileRetrieveResponse = object { id, completedAt, createdAt, 5 more }`
- `id: string`
Unique identifier for the file.
- `completedAt: string`
When the file upload was completed.
- `createdAt: string`
When the file upload session was created.
- `expiresAt: string`
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.
- `status: "PENDING" or "COMPLETED" or "CANCELLED" or "EXPIRED"`
Current upload status of the file.
- `"PENDING"`
- `"COMPLETED"`
- `"CANCELLED"`
- `"EXPIRED"`
### File URL Response
- `FileURLResponse = object { expiresAt, url }`
- `expiresAt: string`
When the download URL expires.
- `url: string`
Temporary download URL for the file.