# Upload API

## **Upload**

<mark style="color:orange;">`PUT`</mark> `https://app.getupdraft.com/api/app_upload/YourEnvironmentAppKey/YourAPIkey/`

**App Upload**<br>

#### Path Parameters

| Name                                                    | Type   | Description                                                                                                                                                                                                            |
| ------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| YourEnvironmentAppKey<mark style="color:red;">\*</mark> | String | Your **App key/ token**. You find it in 'Edit App'. Added directly to request URL.                                                                                                                                     |
| YourAPIKey<mark style="color:red;">\*</mark>            | String | <p><strong>/ token</strong>. You find it in your profile: <a href="https://getupdraft.com/dashboard/profile/tokens"><https://app.getupdraft.com/dashboard/profile/tokens></a></p><p>Added directly to request URL.</p> |
| App                                                     | String | Your app file                                                                                                                                                                                                          |

## Parameters

| Name                  | Required | Description                                                                                                                                                                                                                        |
| --------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| YourEnvironmentAppKey | Yes      | Your **App key/ token**. You find it in 'Edit App'. Added directly to request URL.                                                                                                                                                 |
| YourAPIKey            | Yes      | <p>Your <strong>API key/ token</strong>. You find it in your profile: <a href="https://getupdraft.com/dashboard/profile/tokens"><https://app.getupdraft.com/dashboard/profile/tokens></a></p><p>Added directly to request URL.</p> |
| app                   | Yes      | Application file attached to the request (ipa or apk)                                                                                                                                                                              |
| whats\_new            | No       | Additional release notes for this uploaded build. This text will be added to all email notifications.                                                                                                                              |
| build\_type           | No       | You can also specify the type of assembly.                                                                                                                                                                                         |
| custom\_branch        | No       | You can also specify name of your branch you deployed your build.                                                                                                                                                                  |
| git\_tag              | No       | You can add your Git tag                                                                                                                                                                                                           |
| git\_commit\_hash     | No       | You can add your Git commit hash                                                                                                                                                                                                   |
| git\_url              | No       | You can add the URL to git                                                                                                                                                                                                         |

### Error Codes

In the case of an error, Updraft will return a JSON with `status` => `fail` and `code` with one of the values in the list below.&#x20;

| Error Code | **Description**                                                                                  |
| ---------- | ------------------------------------------------------------------------------------------------ |
| 1          | Incorrect file                                                                                   |
| 2          | This version of your build already exists                                                        |
| 3          | There is already a newer version uploaded, this version you are trying to upload is older.       |
| 4          | This is another application and doesn't match with the application in your project               |
| 5          | This is a different platform type of your application                                            |
| 6          | Your storage space is full. Please upgrade your priceplan.                                       |
| Warning    | You are uploaded an already existing build to your project (same version and same build version) |

###
