# town.delve.video.finishUpload

> 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.finishUpload)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.finishUpload/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qzqct2rrq4u2gmy5g3mjxske/town.delve.video.finishUpload/examples)

## Definitions

### `town.delve.video.finishUpload`

**Type**: `procedure`

Finish an upload. This call is idempotent and safe to retry. On deduplication completedJobId may differ from the input jobId; poll getJobStatus with completedJobId. Probe-based validation failures surface later as JOB_STATE_FAILED from getJobStatus, not as errors from this call.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `jobId` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `completedJobId` | `string` | Yes | The processing job to poll with getJobStatus; on deduplication this may differ from the input jobId. |
| `jobStatus` | `ref` → `town.delve.video.defs#jobStatus` | Yes |  |

#### Errors

- **UploadNotFound**: The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.
- **UploadExpired**: The upload session expired before finalization began.
- **MissingParts**: Not all parts are recorded; the error message lists the missing part numbers.
- **UploadNotReady**: A finish is in progress; check getUploadStatus and retry.
- **UnsupportedContentType**: The assembled object's detected content type is not supported.
- **UploadFailed**: The session is known to have failed; the error carries its failure reason.
- **UploadAborted**: The session is known to have been aborted.
- **ServiceOverloaded**: The service is draining or temporarily at capacity; retry later.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Finish an upload. This call is idempotent and safe to retry. On deduplication completedJobId may differ from the input jobId; poll getJobStatus with completedJobId. Probe-based validation failures surface later as JOB_STATE_FAILED from getJobStatus, not as errors from this call.",
      "errors": [
        {
          "description": "The job ID is unknown or aged out of retention; known terminal sessions are never reported as not found.",
          "name": "UploadNotFound"
        },
        {
          "description": "The upload session expired before finalization began.",
          "name": "UploadExpired"
        },
        {
          "description": "Not all parts are recorded; the error message lists the missing part numbers.",
          "name": "MissingParts"
        },
        {
          "description": "A finish is in progress; check getUploadStatus and retry.",
          "name": "UploadNotReady"
        },
        {
          "description": "The assembled object's detected content type is not supported.",
          "name": "UnsupportedContentType"
        },
        {
          "description": "The session is known to have failed; the error carries its failure reason.",
          "name": "UploadFailed"
        },
        {
          "description": "The session is known to have been aborted.",
          "name": "UploadAborted"
        },
        {
          "description": "The service is draining or temporarily at capacity; retry later.",
          "name": "ServiceOverloaded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "jobId": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "jobId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "completedJobId": {
              "description": "The processing job to poll with getJobStatus; on deduplication this may differ from the input jobId.",
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            },
            "jobStatus": {
              "ref": "town.delve.video.defs#jobStatus",
              "type": "ref"
            }
          },
          "required": [
            "completedJobId",
            "jobStatus"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "town.delve.video.finishUpload",
  "lexicon": 1
}
```
