---
title: "Install an app"
method: POST
path: "/v1/phones/{id}/apps"
tags: ["apps"]
---

# Install an app

`POST /v1/phones/{id}/apps`

## Request

- Base URL: `https://phonebox.dev`
- URL: `https://phonebox.dev/v1/phones/{id}/apps`
- Auth: HTTP bearer

Installs an app in the background: by package, from Phonebox's app library, or by upload, your own APK (POST /v1/apps/uploads). By package it doesn't reach Google Play: install a Play Store app from the Play Store app on the phone instead. With replace, an upload's app is uninstalled first, which deletes its data.

## Path parameters

- `id` string, required

## Request body

- object
  - `package` string: An app in Phonebox's app library, by its package name.
  - `upload` string: An upload of your own APK (upl_…) whose status is ready.
  - `replace` boolean: With upload: uninstall the app first when it is on the phone, which deletes its data. Use it for a build signed with another key, or an older version_code.

## Response `202`

The install started in the background. Follow it in GET /v1/phones/{id}/apps/installs: an install by upload succeeds once the phone lists its package at the upload's version_code.

- object
  - `package` string, required: The app's package: for an upload, the package its APK declares.
  - `upload` string: The upload being installed, for an install by upload.
  - `install` string: This install's ID, for an install by upload: its row in the phone's installs has it.
  - `status` 'running', required

## Other responses

- `400`: Invalid request; details.issues lists each problem as {path, message}
- `401`: Missing or invalid key
- `402`: Insufficient credits, spending limit reached, or the project is frozen
- `403`: Insufficient scope, a phone this key can't use, a browser request, or a setup request that was declined
- `404`: Not found
- `409`: Conflict: the phone's status doesn't allow this, a phone limit is reached, the Idempotency-Key was used with another body, another install is still running on the phone, a newer version of the app is on the phone, an upload that isn't ready, the project's upload storage is full, the clipboard can't be read, a recording is already running or isn't ready, the project keeps 20 recordings, a setup request that expired or already delivered its key, the project has 50 active keys
- `413`: Body too large
- `422`: The request can't be applied, such as an app that isn't in Phonebox's app library, a file that isn't an APK, an install the phone refused, or a feature this phone doesn't offer (feature_unavailable)
- `429`: Rate limited
- `500`: Unexpected server error; keep the request ID
- `502`: The phone service returned an error, or didn't confirm the action
- `503`: No capacity, the phone is briefly unavailable, Phonebox is paused, or payments aren't connected. A batch refused with this error body did nothing on the phone; a 502 or 504 without it, from a proxy or the platform, leaves the outcome unknown.
- `504`: The phone didn't respond in time

---

[API](https://skmtc.dev/phonebox/apis/phonebox-api.md) · [All operations](https://skmtc.dev/phonebox/apis/phonebox-api/llms.txt) · [OpenAPI document](https://skmtc.dev/phonebox/apis/phonebox-api/revisions/87eb2f5211b2?raw)
