---
title: "Request Upload Endpoint"
description: "Details about the Request Upload endpoint for Disguise Cloud"
url: https://developer.disguise.one/cloud/drive/request-upload/
---

# Request Upload

-   [Endpoints](#endpoints)
-   [How to Upload](#how-to-upload)
-   [Response Structure](#response-structure)
-   [Response Example](#response-example)
    -   [Success](#success)
    -   [Errors](#errors)

The `/request-upload` endpoint of the Disguise Cloud Drive API is used to request an upload URL for a new asset or asset version.  
This URL can then be used to upload the content directly to the cloud storage before creating the asset or version.

## Endpoints

`GET https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}}/request-upload`

Request an upload URL to upload either a new asset or asset version.

## How to Upload

Uploading assets or asset versions is a multi step process:

Before you start, you will need:

1.  **drive\_id**: The `drive_id` of the drive you want  
    to upload to (obtained from the  
    [Drives endpoint](/cloud/management/drives)).
    
2.  **content\_id**: The `content_id` of the parent  
    folder you want to upload into (obtained from the  
    [Content endpoint](/cloud/drive/content) or the  
    [Folders Endpoint](/cloud/drive/folders)). This must be a  
    folder in order to request an upload URL.
    

**Required only when creating an asset version:**

4.  **content\_id**: The `content_id` of the asset you  
    want to add the version to. When requesting an upload URL, you will use  
    the parent folder’s `content_id`, but when creating the  
    version, you will instead use the `content_id` of the asset you  
    are adding a version to.
    

1.  First gather your `drive_id` and the parent folder’s `content_id` to determine where you would like to upload the asset to as per the above requirements.
    
2.  Make a `GET` request to the `/request-upload` endpoint with the `drive_id` and `content_id` in the URL. This will return an upload UUID and a URL to upload the asset to.
    
3.  Upload the asset to the URL using a `PUT` request. The asset must be uploaded in a single request, and the payload must be binary data.
    
4.  Once uploaded, make a `POST` request to either the [Create Asset](/cloud/drive/create-asset) or [Create Version](/cloud/drive/create-version) endpoint using the ‘upload\_uuid’ returned from  
    the `/request-upload` endpoint along with the `drive_id` and `content_id` of the parent folder (or the `content_id` of the asset if you are creating a new version).
    

## Response Structure

The responses from the `/request-upload` endpoint include the following fields:

| Field | Type | Description |
| --- | --- | --- |
| **key** | string | The key for the temporary upload location. |
| **url** | string | The URL to upload the asset to, via a PUT request. |
| **upload\_uuid** | string | The unique identifier for the upload. |

## Response Example

```bash
curl -X GET https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}}/request-upload \
-H "Authorization: Token YOUR_API_TOKEN"
```

### Success

A successful response will return a `200 OK` status code and the following JSON:

```json
{
  "key": "tmp/aeab5a21-5873-4014-9d3f-7c6f0479ba6e",
  "url": "https://{{signed_upload_url}}",
  "upload_uuid": "aeab5a21-5873-4014-9d3f-7c6f0479ba6e"
}
```

### Errors

If the drive is not found, the API will return a `404 Not Found` status code and the following JSON:

```json
{
  "error": {
    "message": "Drive not found",
    "details": "Drive not found"
  }
}
```

If the content is not found, the API will return a `404 Not Found` status code and the following JSON:

```json
{
  "error": {
    "message": "Content not found",
    "details": "Content not found"
  }
}
```
