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

# Complete an upload

> Complete an upload after sending the file. The returned asset ID can be reused in projects and brand kits.



## OpenAPI

````yaml /2026-10-22/openapi.json post /uploads/{id}/complete
openapi: 3.1.0
info:
  title: Motion
  version: '2026-10-22'
  description: >-
    Motion 2026-10-22 (legacy) REST API — original contract retained for
    existing integrations. Pass Motion-API-Version: 2026-10-22 (legacy) to
    select this contract explicitly.
servers:
  - url: https://api.motion.so/api/motion
security:
  - MotionApiKey: []
tags:
  - name: Projects
  - name: Exports
  - name: Library
  - name: Templates
  - name: Brand kits
  - name: Connectors
    description: Connect services and control the actions a project may use.
  - name: Automations
  - name: Social posting
  - name: Deprecated (/sessions)
    description: >-
      Earlier single-video endpoints kept callable for existing 2026-10-22
      integrations. Use Projects on 2026-11-19 for new integrations.
paths:
  /uploads/{id}/complete:
    post:
      tags:
        - Library
      summary: Complete an upload
      description: >-
        Complete an upload after sending the file. The returned asset ID can be
        reused in projects and brand kits.
      operationId: completeLibraryUpload
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Upload / asset UUID returned by POST /uploads.
        - $ref: '#/components/parameters/MotionApiVersion'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MotionCompleteLibraryUploadResponse'
              example:
                asset:
                  id: 4f20dcdd-f63b-4898-97d6-2e05c0d37c78
                  filename: launch.mp4
                  status: uploading
                  created_at: '2026-11-17T20:00:00Z'
                  download_url: null
                  expires_at: null
        '400':
          description: Bytes do not match the ticket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Credential invalid or revoked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Missing asset-write permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Upload not found in this scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Upload the file first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - MotionApiKey: []
        - MotionOAuth:
            - motion:assets:write
components:
  parameters:
    MotionApiVersion:
      name: Motion-API-Version
      in: header
      required: false
      description: >-
        Optional API version override for this request. When omitted, Motion
        uses the API version pinned to your API key or OAuth connection.
      schema:
        type: string
        enum:
          - '2026-10-22'
        default: '2026-10-22'
      example: '2026-10-22'
  schemas:
    MotionCompleteLibraryUploadResponse:
      type: object
      properties:
        asset:
          type: object
          properties:
            id:
              type: string
              format: uuid
            filename:
              type: string
            asset_type:
              type: string
              enum:
                - image
                - video
                - audio
                - pdf
                - file
            status:
              type: string
              enum:
                - uploading
                - processing
                - ready
                - failed
            source_type:
              anyOf:
                - type: string
                  enum:
                    - user_uploaded
                    - agent_found
                    - agent_generated
                - type: 'null'
            content_type:
              type:
                - string
                - 'null'
            size_bytes:
              type:
                - number
                - 'null'
            created_at:
              type: string
              format: date-time
            download_url:
              anyOf:
                - type: string
                  format: uri
                - type: 'null'
            expires_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
          required:
            - id
            - filename
            - status
            - created_at
            - download_url
            - expires_at
          additionalProperties: {}
      required:
        - asset
      additionalProperties: false
    ErrorResponse:
      type: object
      description: >-
        Error bodies are JSON. Check the HTTP status first. Permission and
        validation errors use error; service errors may use detail. Optional
        fields explain how to correct the request.
      anyOf:
        - required:
            - error
        - required:
            - detail
      properties:
        error:
          type: string
          description: Error code or readable explanation.
        detail:
          type: string
          description: Readable explanation from the service.
        message:
          type: string
          description: Readable explanation accompanying an error code.
        error_description:
          type: string
          description: Authentication or permission explanation.
        required_scope:
          type: string
          description: Permission required by this operation.
        details:
          type: array
          description: Invalid request fields. Each issue includes a path and message.
          items:
            type: object
            properties:
              code:
                type: string
              path:
                type: array
                items:
                  oneOf:
                    - type: string
                    - type: integer
              message:
                type: string
        issues:
          type: array
          description: Service validation issues.
          items:
            type: object
  securitySchemes:
    MotionApiKey:
      type: http
      scheme: bearer
      description: >-
        A Motion API key. Access is limited to its stored organization,
        workspace, scopes and the creator’s current permissions.
    MotionOAuth:
      type: oauth2
      description: >-
        OAuth REST tokens use the full MCP audience, https://mcp.motion.so/mcp.
        Reauthorize existing connections to add scopes. Current workspace roles
        and resource permissions still apply.
      flows:
        authorizationCode:
          authorizationUrl: https://mcp.motion.so/oauth/authorize
          tokenUrl: https://mcp.motion.so/oauth/token
          scopes:
            motion:automations:read: Read automation definitions, capabilities, runs, and analytics.
            motion:automations:write: Create, edit, delete, invoke, and retry automations.
            motion:connectors:read: >-
              Read available services, your private organization connections and
              allowed actions without secrets.
            motion:connectors:write: >-
              Connect and disconnect your private accounts inside the credential
              organization workspace.
            motion:templates:read: Read and preview accessible templates.
            motion:templates:write: Create, edit, share, and archive prompt templates.
            motion:sessions:read: Read permitted chats, job status and saved exports.
            motion:sessions:write: >-
              Create and steer Motion projects using organization workspace
              credits.
            motion:assets:read: Find and read permitted media library assets.
            motion:brand-kits:read: Read permitted brand kits.
            motion:brand-kits:write: Create and edit brand kits within current app permissions.
            motion:social:read: Read authorized social accounts and posts.
            motion:social:write: >-
              Draft, submit, approve and cancel posts within current app
              permissions.
            motion:assets:write: Create and complete reusable media library uploads.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.