# place.stream.vod.publishDraft

> Published by [did:web:stream.place](https://lexicon.garden/identity/did:web:stream.place)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.vod.publishDraft)
- [Documentation](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.vod.publishDraft/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:stream.place/place.stream.vod.publishDraft/examples)

## Definitions

### `place.stream.vod.publishDraft`

**Type**: `procedure`

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.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | The ats:// URI of the draft to publish. Must have status 'ready'. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `videoCid` | `string` (cid) | Yes | CID of the created place.stream.video record. |
| `videoUri` | `string` (at-uri) | Yes | 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').

## Raw Schema

```json
{
  "id": "place.stream.vod.publishDraft",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "uri"
          ],
          "properties": {
            "uri": {
              "type": "string",
              "description": "The ats:// URI of the draft to publish. Must have status 'ready'."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "NotFound",
          "description": "No draft exists with the given URI for the authenticated user."
        },
        {
          "name": "NotReady",
          "description": "The draft is not ready to publish (status is 'processing' or 'error')."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "videoUri",
            "videoCid"
          ],
          "properties": {
            "videoCid": {
              "type": "string",
              "format": "cid",
              "description": "CID of the created place.stream.video record."
            },
            "videoUri": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the created place.stream.video record."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": null,
      "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."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
