---
title: "Start a direct upload"
method: POST
path: "/projects/{projectId}/uploads/direct"
tags: ["Uploads"]
---

# Start a direct upload

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

## Request

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

Registers a file and returns a signed control URL. GET the control URL for one `part <N> <url>` line per part still missing, PUT each part's bytes (part_size bytes each, the last one the rest) to its URL, then POST the control URL to finish. Running the GET again after a failure lists only what is still missing. A part stored with the wrong size fails the upload: the control URL then answers 422 `size_mismatch …`. DELETE the control URL to cancel. Video, audio and image files only, up to 5 GB; an audio or video file ffprobe can't read fails once its bytes arrive.

## Path parameters

- `projectId` string, required

## Request body

- TypesDirectUploadInput
  - `file_name` string, required
  - `file_size` integer, required
  - `mime_type` string, required

## Response `200`

OK

- object
  - `data` object: Success data
    - `control_url` string
    - `expires_at` string
    - `file_name` string
    - `file_size` integer
    - `media_id` string
    - `part_count` integer
    - `part_size` integer
    - `upload_id` 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)
