> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beta.adapter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Finalize a presigned video upload

> Finalize the multipart upload, verify the object (true size ≤150MB and
real MP4/MOV magic bytes — never trust the declared values), then publish
a typed `video` event (VideoRawData contract) that routes the file to
media enrichment. An optional `hint` rides on event.metadata as
`enrichment_hint` and is folded into the analysis prompt.

<Snippet file="api/ingestion/ingest-video-complete.mdx" />


## OpenAPI

````yaml POST /v1/custom-connectors/{connector_id}/ingest/video/complete
openapi: 3.1.0
info:
  title: Adapter API
  description: Connect and sync data from any SaaS tool.
  version: 0.1.0
servers:
  - url: https://api.adapter.com
security:
  - ApiKeyAuth: []
tags:
  - name: connections
    description: Manage OAuth connections to data sources.
paths:
  /v1/custom-connectors/{connector_id}/ingest/video/complete:
    post:
      tags:
        - ingestion
      summary: Finalize a presigned video upload
      description: >-
        Finalize the multipart upload, verify the object (true size ≤150MB and

        real MP4/MOV magic bytes — never trust the declared values), then
        publish

        a typed `video` event (VideoRawData contract) that routes the file to

        media enrichment. An optional `hint` rides on event.metadata as

        `enrichment_hint` and is folded into the analysis prompt.
      operationId: ingest_video_complete
      parameters:
        - name: connector_id
          in: path
          required: true
          schema:
            type: string
            title: Connector Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoUploadCompleteRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestUploadResponse'
        '402':
          description: >-
            Ingest fully rejected — the workspace is over a tier quota
            (documents / storage / per-document size). Partial batches instead
            return 200 with a `rejected` list. Not transient; upgrade or free
            space rather than retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuotaExceededErrorModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    VideoUploadCompleteRequest:
      properties:
        file_id:
          type: string
          title: File Id
          description: file_id from the upload-url response.
        upload_id:
          type: string
          title: Upload Id
          description: upload_id from the upload-url response.
        parts:
          items:
            $ref: '#/components/schemas/VideoUploadPart'
          type: array
          minItems: 1
          title: Parts
          description: All uploaded parts with their ETags.
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
          description: Original filename, stored on the video evidence.
        hint:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Hint
          description: >-
            Free-text hint about the video's content, folded into the enrichment
            prompt.
      type: object
      required:
        - file_id
        - upload_id
        - parts
      title: VideoUploadCompleteRequest
    IngestUploadResponse:
      properties:
        status:
          type: string
          title: Status
          description: Always 'uploaded' (a quota-rejected upload returns 402).
          examples:
            - uploaded
        key:
          type: string
          title: Key
          description: S3 key of the stored raw object.
        size:
          type: integer
          title: Size
          description: Size of the uploaded blob in bytes.
        file_id:
          type: string
          title: File Id
          description: external_id assigned to the resulting event.
      type: object
      required:
        - status
        - key
        - size
        - file_id
      title: IngestUploadResponse
    QuotaExceededErrorModel:
      properties:
        error_code:
          type: string
          const: quota_exceeded
          title: Error Code
          default: quota_exceeded
        message:
          type: string
          title: Message
          default: 'Ingest rejected: this workspace is over its plan quota.'
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Carries `rejected`: the refused items as `{external_id, resource,
            reason}` (resource ∈ documents/storage/doc_size).
      type: object
      title: QuotaExceededErrorModel
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VideoUploadPart:
      properties:
        part_number:
          type: integer
          minimum: 1
          title: Part Number
          description: 1-based index matching the part_urls order.
        etag:
          type: string
          title: Etag
          description: ETag header returned by S3 for the part PUT.
      type: object
      required:
        - part_number
        - etag
      title: VideoUploadPart
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: Pass your `pk_live_...` API key as a Bearer token.

````