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

# Complete upload

> Register a file uploaded via signed URL as a media library asset so it can be used in posts, clips, and generation jobs.

Final step of the [signed-URL flow](/docs/api-reference/uploads/signed-url): after
`PUT`ting the file bytes to the signed `uploadUrl`, call this with the
`blobName` from the same response to record the file as an asset in your media
library.

The server verifies the object actually exists in storage (you get a `400` if
the `PUT` didn't happen) and reads its size and MIME type from storage
metadata. `blobName` must come from **your own** signed-URL response — blobs
outside your upload prefix are rejected with `403`.

## Response

Same shape as [POST /uploads](/docs/api-reference/uploads/create):

```json theme={null}
{
  "success": true,
  "data": {
    "id": "cm456def",
    "name": "big-video.mp4",
    "url": "https://.../uploads/usr_123/2026-08-04T10-00-00-000Z-big-video.mp4",
    "mimeType": "video/mp4",
    "type": "VIDEO",
    "fileSize": 209715200,
    "createdAt": "2026-08-04T10:00:00.000Z"
  }
}
```


## OpenAPI

````yaml POST /uploads/complete
openapi: 3.1.0
info:
  title: Unsora API
  version: 1.2.0
  description: >-
    Public API for Unsora integrations. Use Bearer token from Clerk in
    Authorization header.
servers:
  - url: /api/v1
    description: Versioned API
security: []
tags:
  - name: User
  - name: Connect
  - name: Stripe
  - name: Video
  - name: Image
  - name: Influencer
  - name: Thumbnail
  - name: Clipping
  - name: Music
  - name: Voiceover
  - name: Uploads
paths:
  /uploads/complete:
    post:
      tags:
        - Uploads
      summary: Register a direct-uploaded file as an asset
      description: >-
        Call after PUTting the file bytes to a signed upload URL. Verifies the
        object exists in storage and records it in your media library. blobName
        must come from your own /uploads/signed-url response.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - blobName
              properties:
                blobName:
                  type: string
                fileName:
                  type: string
      responses:
        '200':
          description: Registered asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadAssetResponse'
        '400':
          description: Upload not found in storage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UploadAssetResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/UploadAsset'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - error
    UploadAsset:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
          description: Public URL of the stored file.
        mimeType:
          type: string
        type:
          type: string
          enum:
            - IMAGE
            - VIDEO
            - AUDIO
            - DOCUMENT
        fileSize:
          type: integer
          nullable: true
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````