---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Install app on a lease"
description: "`sandboxes.leases.install_app` (POST /v1/{name}:installApp): Installs an Android app (APK) on an ANDROID lease."
type: reference
product: sandboxes
summary: "Installs an Android app (APK) on an ANDROID lease."
updated: 2026-09-28
nav: false
---

Installs an Android app (APK) on an ANDROID lease.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:installApp`
- **Scope** `sandboxes:exec`
- **Effect** `write` — a successful call changes state.
- **Collection** [leases](/docs/api/leases)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The name of the lease. Required. |
| `apk_path` | `string` | The APK's path in the lease (write it with WriteLeaseFile first). Required. |
| `grant_permissions` | `bool` | Grant every runtime permission the app declares. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `package_name` | `string` | The installed package name. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`NOT_FOUND`](/docs/api/errors/NOT_FOUND) — No method is served at this path.
- [`UNIMPLEMENTED`](/docs/api/errors/UNIMPLEMENTED) — The path or method is not served (yet) at this version.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:installApp" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"apk_path":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.sandboxes.leases.installApp({ apkPath: '…', name: 'orgs/acme/projects/shop/envs/production/leases/lease' })
```

**Rust**

```rust
let mut req = sylphx::sandboxes::InstallLeaseAppRequest::default();
req.apk_path = "…".to_string();
req.name = "orgs/acme/projects/shop/envs/production/leases/lease".to_string();
let response = sx.sandboxes().leases().install_app(req).await?;
```

**CLI**

```bash
sylphx sandboxes leases install-app orgs/acme/projects/shop/envs/production/leases/lease
```

**MCP**

```json
{ "method_id": "sandboxes.leases.install_app", "args": {"apk_path":"…","name":"orgs/acme/projects/shop/envs/production/leases/lease"} }
```
