---
title: "Upsert the video's draft (debounced autosave). A stale"
method: PUT
path: "/api/v1/videos/{video_id}/edit"
tags: ["Video Edits"]
---

# Upsert the video's draft (debounced autosave). A stale

`PUT /api/v1/videos/{video_id}/edit`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/videos/{video_id}/edit`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

`base_updated_at` is refused with 409 so a second tab cannot<br/>silently clobber newer work.

## Path parameters

- `video_id` integer, required: Video id

## Request body

- EditDraftPutRequest: Upsert payload for a video's editor draft (debounced autosave).
  - `base_updated_at` string, date-time, nullable
  - `composition_json` string, required
  - `schema_version` integer

## Response `200`

OK

- EditDraftResponse: A video's editor draft as the client loads it.
  - `composition_json` string, required
  - `exported_asset_id` integer, nullable, required
  - `schema_version` integer, required
  - `status` string, required
  - `updated_at` string, date-time, nullable, required
  - `video_id` integer, required

## Other responses

- `409`: Conflict
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
