## 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" ```