Create a file upload session
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 for the full upload flow, supported purposes, and size limits. If you are uploading a meeting transcript, see Uploading meeting transcripts for the follow-up meeting attachment flow.
Required scope: files:create
Rate limit category: Write
Body ParametersJSON
filename: string
Original filename.
minLength1
maxLength255
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.
minimum1
maximum536870912
Returns
Create a file upload session
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
}'{
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"expiresAt": "expiresAt",
"filename": "filename",
"mimeType": "mimeType",
"sizeBytes": -9007199254740991,
"status": "PENDING",
"uploadHeaders": {
"foo": "string"
},
"uploadUrl": "uploadUrl"
}Returns Examples
{
"id": "id",
"completedAt": "completedAt",
"createdAt": "createdAt",
"expiresAt": "expiresAt",
"filename": "filename",
"mimeType": "mimeType",
"sizeBytes": -9007199254740991,
"status": "PENDING",
"uploadHeaders": {
"foo": "string"
},
"uploadUrl": "uploadUrl"
}