> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Install

Install an app's version as an installation, upgrade an installation to a newer version, or install one again after it
failed or was uninstalled. The request takes the same body as [`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan), plus
`confirmed`, the digest of the plan the caller showed, and answers as soon as the work has started.

## **POST** `/revisions/:id/data/command` (Command: `install`)

1. **It plans again**, running [the checks, in order](https://docs.blobhub.io/blob-types/installer/overview.md#the-checks-in-order), and refuses
   a plan with a problem, with the first problem's code. It refuses, too, without `confirmed`, or when `confirmed` is
   not the digest of the plan it has just made.
2. **It moves the record to `installing`**, creating it on a first install and making it again over an `uninstalled`
   record. Another operation on it is refused until this one ends.
3. **It creates the accounts the installation lacks and writes the credentials due now**
   ([Install and upgrade](https://docs.blobhub.io/blob-types/installer/overview.md#install-and-upgrade)). When it does either, it needs a person
   behind the request, which the plan has already checked ([Access](https://docs.blobhub.io/blob-types/installer/overview.md#access)).
4. **It answers** with the record, and a worker makes and updates the blobs, applies each manifest and runs the
   migration workflow.

### Request Body

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `command` | string | Yes | Must be `install`. |
| `installation` | string | Yes | The installation's alias. A new alias installs; an existing one upgrades, or installs again. |
| `app` | object | Yes | `org`, `blob` and, optionally, `version`, as [`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan) takes them. |
| `inputs` | object | No | Values by input name. On an existing installation, only what changes. A secret is never kept in the record. |
| `confirmed` | string | Yes | The `digest` of the plan the caller showed, as [`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan#digest) answered it: the caller has seen the lines and limits the install acts on. It matches `^sha256:[0-9a-f]{64}$`; `true`, which confirmed an install before digests, is refused with 400 `invalid_request_body`. |

### Response

| Parameter | Type | Description |
| :- | :- | :- |
| `installation` | object | The [record](https://docs.blobhub.io/blob-types/installer/overview.md#installations), `installing`. |

### Errors

| Status | Error | Cause |
| :- | :- | :- |
| 400 | `app_not_confirmed` | No `confirmed`. The body carries the `lines` the install would act on and their `digest`. |
| 400 | `input_missing` | A required input was not given, in this request or an earlier one. |
| 400 | `input_invalid` | A document fails its schema. |
| 400 | `version_not_found` | No committed revision holds the version, or `draft` names an app blob in another organization. |
| 400 | `invalid_app` | The version has a problem of its own, or a credential's `body` does not render or does not fit its type. The body names the file, never a value. |
| 400 | `invalid_installation` | The installation's alias breaks its rule, or a blob name made from it is not a valid blob alias. |
| 400 | `development_mismatch` | The draft over an installation of committed versions, or a committed version over a development installation. |
| 400 | `version_downgrade` | The version is older than the installation's `version`: an installation only moves forward. |
| 400 | `upgrade_unsupported` | The installation was last ready at a version older than the version's `upgrade.from`. |
| 400 | `limit_unmet` | A requirement of the version is not met where the install would leave it ([Requirements](https://docs.blobhub.io/blob-types/installer/overview.md#requirements)). |
| 400 | `person_required` | The install makes service accounts, credentials or keys, and the request does not come from a person. |
| 400 | `limit_exceeded` | A write lost a race the plan could not see, such as a blob created between the plan and the write. The body carries `limit`: the [limit refusal](https://docs.blobhub.io/general/limits.md#when-a-limit-is-reached). |
| 400 | `invalid_request_body` | A parameter is missing or has the wrong type, or `confirmed` is not a digest. Or a string anywhere in the body, a key included, holds a lone surrogate, which is refused before any check: `<dotted.path>: a lone surrogate is not valid UTF-8`, as `inputs.config.city: a lone surrogate is not valid UTF-8`. A key that holds one is written escaped in the path, as `inputs.config.city.\udc00: a lone surrogate is not valid UTF-8`, where `\udc00` is six ASCII characters, `\\udc00` on the wire. |
| 403 | `forbidden` | The caller does not have ADMIN on the installer blob and on its organization; or the caller's user may not read the app blob, which includes an `app` that names no blob. |
| 409 | `alias_in_use` | A blob the install would create exists and is not this installation's. |
| 409 | `installation_busy` | An operation on the installation is running: it is `installing` or `uninstalling`, and started less than two hours ago; or another request took the record first. |
| 409 | `migration_running` | The installation's last migration has not ended. |
| 409 | `blob_not_ready` | The app blob is not ready, or a blob of the installation is still being deleted after an uninstall. Or a delete has claimed the installer blob first: `blob_not_ready: blob installed-apps is being deleted`, with `problems`, `lines` and `limits`, and nothing is written. |
| 409 | `app_busy` | A busy object says the app is busy: the installed version's, and, after a failed upgrade, the last ready version's too ([The busy object](https://docs.blobhub.io/blob-types/installer/overview.md#the-busy-object)). |
| 409 | `plan_changed` | `confirmed` is not the digest of the plan made now. The body is that plan, in the whole shape [`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan#response) answers, `app` and `from_version` included. |
| 503 | `renderer_unavailable` | The platform's template renderer could not be reached. Nothing was written; ask again. |

A refusal for one of the plan's [problems](https://docs.blobhub.io/blob-types/installer/operations/plan.md#problems) takes the first problem's
code, and its body carries all the plan's `problems`, its `lines` and its `limits`. The status is 409 for
`alias_in_use`, `blob_not_ready`, `installation_busy`, `migration_running` and `app_busy`, and 400 for the other codes.
`app_not_confirmed` carries `lines` and `digest`, `plan_changed` the plan and `limit_exceeded` its `limit`; any other
refusal, such as `forbidden`, `invalid_request_body`, `renderer_unavailable` or a credential's `invalid_app`, carries
only `error` and `message`.
A record busy for more than two hours (7200 seconds) is no longer busy, and the reads serve it as `failed`: the install
ends it `failed` in the store, with the log line `<operation> failed: out of time` naming the operation that was
running, and goes on.

### Example

The first install of Field Reports 0.2.0 as `reports`, with its report settings and a weather key, confirming the
digest its [plan](https://docs.blobhub.io/blob-types/installer/operations/plan.md#examples) answered:

```json Request theme={null}
{
  "command": "install",
  "installation": "reports",
  "app": {"org": "acme-corp", "blob": "field-reports", "version": "0.2.0"},
  "inputs": {
    "config": {"timezone": "Europe/Oslo", "sites": ["north-yard"]},
    "weather_key": "wk_example_…"
  },
  "confirmed": "sha256:9d7905e6b56fe7c0a7b8219120b7bc66b664474d0b9c10733c406b05b1a6b76e"
}
```

```json Response theme={null}
{
  "status": "success",
  "installation": {
    "alias": "reports",
    "app": "acme-corp/field-reports",
    "version": "0.2.0",
    "revision_id": "5d2a7c90-3b1e-4f6a-9c08-7e4b2d1f6a35",
    "status": "installing",
    "operation": "install",
    "development": false,
    "inputs": {"config": {"timezone": "Europe/Oslo", "sites": ["north-yard"]}},
    "blobs": {},
    "accounts": {"runner": "c4b8e217-9a05-4d3f-b7c6-0e2a51f8d943"},
    "created_at": "2026-11-20T14:20:03.000Z",
    "updated_at": "2026-11-20T14:20:04.000Z"
  }
}
```

The account exists when the request answers; the blobs follow, and `blobs` fills as the worker makes them. The record
keeps `config` and never `weather_key`.

### Without confirmation

The same request without `confirmed` writes nothing and answers the lines it would act on and their digest. Its
`message` is `Confirm the lines this request acts on by sending it again with confirmed: <digest>.`, with the digest
in place of `<digest>`. Sent again with `"confirmed": "<digest>"`, it installs, unless the plan has changed meanwhile:

```json Request theme={null}
{
  "command": "install",
  "installation": "reports",
  "app": {"org": "acme-corp", "blob": "field-reports", "version": "0.2.0"},
  "inputs": {
    "config": {"timezone": "Europe/Oslo", "sites": ["north-yard"]},
    "weather_key": "wk_example_…"
  }
}
```

```json Response theme={null}
{
  "status": "failure",
  "error": "app_not_confirmed",
  "message": "Confirm the lines this request acts on by sending it again with confirmed: sha256:9d7905e6b56fe7c0a7b8219120b7bc66b664474d0b9c10733c406b05b1a6b76e.",
  "lines": [
    "creates blob reports-flows (blobhub.compute.workflow)",
    "creates blob reports-schedules (blobhub.compute.scheduler)",
    "creates service account reports-runner, a member of both blobs with WRITE",
    "stores credentials weather, blobhub and sync_token on reports-runner",
    "widget report-viewer asks to: read session objects, read threads",
    "runs reports-migrate in session reports"
  ],
  "digest": "sha256:9d7905e6b56fe7c0a7b8219120b7bc66b664474d0b9c10733c406b05b1a6b76e"
}
```

Key off `error`; `message` is prose for a person.

### When the plan changed

`confirmed` names one plan. If anything it covers changed between the plan the caller showed and this request, such
as another operation on the record, a newer version left out of the request, an input or a limit's value, the install
refuses with 409 `plan_changed` and writes nothing. Its `message` is
`The plan changed since it was confirmed; review it again.`, and its body is the plan made now, in the whole shape
[`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan#response) answers: `app`, `from_version`, `inputs`, `lines`, `limits`,
`deletes`, `problems` and `digest`. Show it again, and send its digest to install it.

### Following the install

The answer is `installing`; the log shows the rest. Read [List Log](https://docs.blobhub.io/blob-types/installer/operations/list-log.md) from the
last entry id held before the request, passing `next` back as `after`, once a second while
[Get Installation](https://docs.blobhub.io/blob-types/installer/operations/get-installation.md) answers `installing`, then once more. The
installation ends `ready`, or `failed` with the reason in the log. A failed install is installed again with the same
body and the digest of a new plan: the operation that failed changed the record, so the old digest no longer matches.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.