---
title: "Create a file upload session"
method: POST
path: "/v1/files"
---

# 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 <u>[File uploads](/using-the-api/file-uploads/)</u> for the full upload flow, supported purposes, and size limits. If you are uploading a meeting transcript, see <u>[Uploading meeting transcripts](/using-the-api/uploading-meeting-transcripts/)</u> for the follow-up meeting attachment flow.

**[Required scope](/using-the-api/scopes/):** `files:create`

**[Rate limit category](/using-the-api/rate-limits/):** Write

## Headers

- `Lightfield-Version` '2026-03-01', required

## Request body

- object
  - `purpose` 'meeting_transcript' | 'knowledge_user' | 'knowledge_workspace' | 'email_attachment' — 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.
  - `filename` string, required — Original filename.
  - `mimeType` string, required — MIME type of the file. Must be allowed for the given purpose (if specified).
  - `sizeBytes` integer, required — Expected file size in bytes. Maximum 512 MB.

## Response `200`

OK

- FileCreateResponse
  - `id` string, required — Unique identifier for the file.
  - `status` 'PENDING' | 'COMPLETED' | 'CANCELLED' | 'EXPIRED', required — Current upload status of the file.
  - `filename` string, required — Original filename.
  - `mimeType` string, required — MIME type of the file.
  - `sizeBytes` integer, required — File size in bytes.
  - `createdAt` string, required — When the file upload session was created.
  - `completedAt` string, nullable, required — When the file upload was completed.
  - `expiresAt` string, nullable, required — When the upload session expires. Null once completed, cancelled, or expired.
  - `uploadUrl` string, required — Upload URL. Upload the file bytes directly to this URL.
  - `uploadHeaders` object, required — Headers to include in the upload request.

## Other responses

- `400` — 400
- `401` — 401
- `403` — 403
- `404` — 404
- `409` — 409
- `415` — 415
- `422` — 422
- `429` — 429
- `500` — 500
- `501` — 501
- `503` — 503
- `504` — 504

---

[API](https://skmtc.net/lightfld/apis/api-reference.md) · [All operations](https://skmtc.net/lightfld/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightfld/api-reference/versions/93b6c5de5463/schema)
