# place.stream.vod.publishDraft

> Promote a ready draft VOD to a public place.stream.video record. The server carries over source and durationMs from the draft, backfills a generated thumbnail if the draft has none, writes the video record via putRecord, then deletes the draft.

- Kind: procedure
- Authority: vod.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.vod.publishDraft)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.vod.publishDraft/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.vod.publishDraft/analytics)

## Procedure (`place.stream.vod.publishDraft`)

Type: procedure · POST

### Input (application/json)

- `uri` (string, required): The ats:// URI of the draft to publish. Must have status 'ready'.

### Output (application/json)

- `videoCid` (string · cid, required): CID of the created place.stream.video record.
- `videoUri` (string · at-uri, required): AT-URI of the created place.stream.video record.

### Errors

- `NotFound`: No draft exists with the given URI for the authenticated user.
- `NotReady`: The draft is not ready to publish (status is 'processing' or 'error').

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Promote a ready draft VOD to a public place.stream.video record. The server carries over source and durationMs from the draft, backfills a generated thumbnail if the draft has none, writes the video record via putRecord, then deletes the draft.",
      "errors": [
        {
          "description": "No draft exists with the given URI for the authenticated user.",
          "name": "NotFound"
        },
        {
          "description": "The draft is not ready to publish (status is 'processing' or 'error').",
          "name": "NotReady"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "uri": {
              "description": "The ats:// URI of the draft to publish. Must have status 'ready'.",
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "videoCid": {
              "description": "CID of the created place.stream.video record.",
              "format": "cid",
              "type": "string"
            },
            "videoUri": {
              "description": "AT-URI of the created place.stream.video record.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "videoUri",
            "videoCid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "place.stream.vod.publishDraft",
  "lexicon": 1
}
```
