# Upgrade deployed apps to latest version

> API reference for upgrading deployed apps to the latest published version in bulk.

Upgrades one or more deployed apps to their latest published version.

## API endpoint

`POST` `<BaseURL>/models/deployed/apps/updateToLatestAppVersionBulk`

See [Base URL](https://docs.uipath.com/apps/automation-cloud/latest/api-guide/base-url) for the root endpoint path.

## Request headers

| Header | Value |
| --- | --- |
| **Authorization** | Bearer `<access_token>` |
| **Content-Type** | application/json |
| **X-UiPath-Internal-TenantId** | `<tenant_id>` |
| **X-UiPath-FolderKey** | `<folder_key>` |

:::note
Replace all the values between the angle brackets `<...>` with their corresponding use-case values.

The `<access_token>` is the one you received when you authorized the external application with the `Apps` or `Apps.Write` scope, and the `OR.Folders.Read` scope. It is available for 1 hour, then you need to generate a new one, or request a refresh token.
:::

## Request body (required)

```json
{
  "deploymentIds": [
    "deployment-id-1",
    "deployment-id-2"
  ]
}
```

| Field | Data type | Description |
| --- | --- | --- |
| **deploymentIds** (required) | `string[]` | The deployment IDs of the deployed apps to upgrade. |

## Responses

### 200 OK

Returns the list of successfully updated deployments and any failed items.

```json
{
  "updatedDeployments": [
    {
      "id": "string",
      "appSystemName": "string",
      "version": 3
    }
  ],
  "failedItems": ["deployment-id-2"]
}
```

| Field | Data type | Description |
| --- | --- | --- |
| **updatedDeployments** | `array` | The list of successfully upgraded deployments. |
| **updatedDeployments[].id** | `string` | The deployment ID. |
| **updatedDeployments[].appSystemName** | `string` | The system name of the app. |
| **updatedDeployments[].version** | `number` | The new version number after upgrade. |
| **failedItems** | `string[]` | The deployment IDs that failed to upgrade. |

### 401 Unauthorized

You are not authenticated. Make sure you are using a valid access token with the `Apps` or `Apps.Write` scope.

### 403 Forbidden

You don't have permission to edit deployed apps in the specified folder.
