Create a file upload session
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
Parameters
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 stage an upload for the authenticated user or workspace. Completing the upload does not add it to Knowledge; promote it separately through the agent or Knowledge workflow. Use contact_avatar for an image that will be set as a contact photo through the contact $profilePhotoUrl field. Not returned in responses.
Create a file upload session
lightfield file create \
--api-key 'My API Key' \
--filename x \
--mime-type mimeType \
--size-bytes 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"
}