---
title: "Import an upload from a URL"
method: POST
path: "/projects/{projectId}/uploads/import"
tags: ["Uploads"]
---

# Import an upload from a URL

`POST /projects/{projectId}/uploads/import`

## Request

- Base URL: `https://api.rendley.com/v1`
- URL: `https://api.rendley.com/v1/projects/{projectId}/uploads/import`
- Auth: API key in header `Authorization`

One-call upload for a file that is already hosted: the server downloads it from a public HTTPS direct link, stores it and returns the completed upload. Use the returned media_id as the `media` reference of AI actions. No client-side hashing or presigned PUT is needed. The host must report Content-Length; files are capped at 5 GB and must be video, audio or images. Dropbox and Google Drive share links are converted to direct downloads. With `async: true` the link is checked and the upload returned at once with status `importing`; the download runs in the background (follow it with GET /projects/{projectId}/uploads/{media_id}/status).

## Path parameters

- `projectId` string, required

## Request body

- TypesImportUploadInput
  - `async` boolean: Async returns the row at once and downloads in the background; follow it with the upload status endpoint.
  - `download_url` string, required
  - `file_name` string
  - `mime_type` string
  - `project_id` string
  - `role` 'library' | 'pending' | 'staged' | 'transient': Role/Source follow the same defaults as UploadInput.
  - `source` 'editor' | 'mcp' | 'agent' | 'export' | 'ai' | 'duplicate'

## Response `200`

OK

- object
  - `data` object: Success data
    - `duration` number
    - `error` string: Error says why a failed upload failed.
    - `file_hash` string
    - `media_id` string: MediaID is the upload's storage_key — the library media id the client should reuse when injecting a pending upload, so ids stay stable across backend and editor.
    - `mime_type` string
    - `original_file_name` string
    - `role` string
    - `status` string
    - `storage_url` string
  - `error` HttpResponseAPIError
    - `code` string
    - `fields` HttpResponseFieldError[]
      - `field` string
      - `message` string
    - `message` string
  - `meta` unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/rendley/apis/rendley-api.md) - [All operations](https://skmtc.dev/rendley/apis/rendley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rendley/apis/rendley-api/revisions/7eb8713bbf78?raw)
