---
title: "Cancel a file upload"
method: POST
path: "/v1/files/{id}/cancel"
---

# Cancel a file upload

`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, required — Unique identifier of the file to cancel.

## Headers

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

## Request body

- object

## Response `200`

OK

- FileCancelResponse
  - `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.

## 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)
