---
title: "Upload the video of a video scan through the API"
method: PUT
path: "/scans/{id}/video"
---

# Upload the video of a video scan through the API

`PUT /scans/{id}/video`

## Request

- Base URL: `https://api.spacecontext.app/v1`
- URL: `https://api.spacecontext.app/v1/scans/{id}/video`
- Auth: HTTP bearer

Only when `upload.url` points here (no direct upload link available; always for a test scan, whose video is counted and dropped, never stored). `Content-Length` and `Content-Type` must match what was declared, and the body must be that size. At most 99614720 bytes (95 MiB): a bigger video answers 413 `FILE_TOO_LARGE` and goes to the direct upload link instead. Needs `scans:write`.

## Path parameters

- `id` string, required

## Response `200`

Video stored

- ScanUpload
  - `object` 'scan_frame' | 'scan_video', required
  - `scan_id` string, required
  - `index` integer
  - `bytes` integer, required
  - `content_type` string

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `409`: Error response
- `413`: Error response
- `415`: Error response
- `429`: Too many requests. Retry after the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spacecontext/apis/space-context-api.md) · [All operations](https://skmtc.dev/spacecontext/apis/space-context-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacecontext/apis/space-context-api/revisions/1dca940259b4?raw)
