# Deploy a published app version

> API reference for deploying a previously published version of an app to a folder.

Deploys a previously published version of an app to a folder.

## API endpoint

`POST` `<BaseURL>/models/{appSystemName}/publish/versions/{version}/deploy`

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.
:::

## Path variables

| Path variable | Data type | Description |
| --- | --- | --- |
| **appSystemName** (required) | `string` | The system name of the app to deploy. |
| **version** (required) | `number` | The published version number to deploy. |

## Request body (optional)

```json
{
  "tags": ["tag1", "tag2"]
}
```

| Field | Data type | Description |
| --- | --- | --- |
| **tags** (optional) | `string[]` | System tag values to attach to the deployed app. |

## Responses

### 200 OK

Returns the ID of the newly created deployment.

```json
{
  "id": "string"
}
```

### 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 deploy apps in the specified folder.
