# town.delve.video.startUpload

> Published by [delve.town](https://lexicon.garden/identity/did:plc:qzqct2rrq4u2gmy5g3mjxske)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.startUpload)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.startUpload/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.startUpload/examples)

## Definitions

### `town.delve.video.startUpload`

**Type**: `procedure`

Start a multipart video upload. The declared size is exact, while optional media properties are advisory and used only for early failure; the authoritative probe runs asynchronously after upload.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `durationMs` | `integer` | No | Advisory, non-authoritative duration used only for early failure; the authoritative probe runs asynchronously after upload. |
| `height` | `integer` | No | Advisory, non-authoritative height used only for early failure; the authoritative probe runs asynchronously after upload. |
| `mimeType` | `string` | Yes | Declared MIME type of the video. |
| `name` | `string` | No | Optional client-provided file name. |
| `sizeBytes` | `integer` | Yes | Exact byte size of the complete upload-ready video file before it is split into parts. |
| `width` | `integer` | No | Advisory, non-authoritative width used only for early failure; the authoritative probe runs asynchronously after upload. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `expiresAt` | `string` (datetime) | Yes |  |
| `jobId` | `string` | Yes |  |
| `partCount` | `integer` | Yes |  |
| `partSizeBytes` | `integer` | Yes |  |

#### Errors

- **UnsupportedContentType**: The declared MIME type is not supported.
- **VideoTooLarge**: The exact file size exceeds the per-file cap or remaining daily byte allowance.
- **VideoTooLong**: The advisory declared duration exceeds the limit.
- **BadAspectRatio**: The advisory declared dimensions have an unsupported aspect ratio.
- **DailyLimitExceeded**: The daily video or byte allowance, including active reservations, is exhausted.
- **TooManyOpenUploads**: The account has reached its open multipart upload limit.
- **UploadForbidden**: The account is not permitted to upload video.
- **ServiceOverloaded**: The service is draining, at capacity, or temporarily unable to create the multipart upload.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Start a multipart video upload. The declared size is exact, while optional media properties are advisory and used only for early failure; the authoritative probe runs asynchronously after upload.",
      "errors": [
        {
          "description": "The declared MIME type is not supported.",
          "name": "UnsupportedContentType"
        },
        {
          "description": "The exact file size exceeds the per-file cap or remaining daily byte allowance.",
          "name": "VideoTooLarge"
        },
        {
          "description": "The advisory declared duration exceeds the limit.",
          "name": "VideoTooLong"
        },
        {
          "description": "The advisory declared dimensions have an unsupported aspect ratio.",
          "name": "BadAspectRatio"
        },
        {
          "description": "The daily video or byte allowance, including active reservations, is exhausted.",
          "name": "DailyLimitExceeded"
        },
        {
          "description": "The account has reached its open multipart upload limit.",
          "name": "TooManyOpenUploads"
        },
        {
          "description": "The account is not permitted to upload video.",
          "name": "UploadForbidden"
        },
        {
          "description": "The service is draining, at capacity, or temporarily unable to create the multipart upload.",
          "name": "ServiceOverloaded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "durationMs": {
              "description": "Advisory, non-authoritative duration used only for early failure; the authoritative probe runs asynchronously after upload.",
              "type": "integer"
            },
            "height": {
              "description": "Advisory, non-authoritative height used only for early failure; the authoritative probe runs asynchronously after upload.",
              "type": "integer"
            },
            "mimeType": {
              "description": "Declared MIME type of the video.",
              "maxLength": 255,
              "minLength": 3,
              "type": "string"
            },
            "name": {
              "description": "Optional client-provided file name.",
              "maxLength": 256,
              "type": "string"
            },
            "sizeBytes": {
              "description": "Exact byte size of the complete upload-ready video file before it is split into parts.",
              "minimum": 1,
              "type": "integer"
            },
            "width": {
              "description": "Advisory, non-authoritative width used only for early failure; the authoritative probe runs asynchronously after upload.",
              "type": "integer"
            }
          },
          "required": [
            "sizeBytes",
            "mimeType"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "jobId": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "partCount": {
              "type": "integer"
            },
            "partSizeBytes": {
              "type": "integer"
            }
          },
          "required": [
            "jobId",
            "partSizeBytes",
            "partCount",
            "expiresAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "town.delve.video.startUpload",
  "lexicon": 1
}
```
