# One-Step Install

The customer-facing half of the one-step install: claim a one-time install token (issues a licence, a registry credential and an address under institflow.app, and hands back the current bundle) and download the installer script. Unauthenticated — the caller is an installer script on a customer's own server, not a platform-admin session.

Generated from `apps/api/openapi.json`. HTML version: https://docs.institflow.com/en/reference/install

2 operations.

## POST /api/v1/install/claim

Claim a one-time install token: issues a licence, a registry credential, an address under institflow.app, and the current bundle. Every failure reason (wrong/used/expired/revoked token, ended customer, invalid licence) answers the same 404.

- Operation id: `InstallClaimController_claim_v1`
- Permission: —
- Auth: public (no credential)
- `Idempotency-Key`: not required

### Request body

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `token` | string | yes | 1–4096 chars |
| `installId` | string (uuid) | yes |  |
| `publicKey` | string | no | 1–4000 chars |
| `serverIp` | string | no | 1–64 chars |
| `hostname` | string | no | 1–255 chars |
| `version` | string | no | 1–64 chars |
| `domain` | string | no | 1–253 chars |

```json
{
  "token": "string",
  "installId": "2472867d-2472-7472-8728-2472867d2472",
  "publicKey": "string",
  "serverIp": "string",
  "hostname": "string",
  "version": "string",
  "domain": "string"
}
```

### Responses

**201** — Everything the installer needs, once.

| Property | Type | Required | Constraints |
| --- | --- | --- | --- |
| `licenseKey` | string | yes |  |
| `registry` | object | yes |  |
| `address` | string | yes |  |
| `bundle` | object | yes |  |
| `tenant` | object | yes |  |

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X POST "https://your-institute.example/api/v1/install/claim" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "token": "string",
    "installId": "2472867d-2472-7472-8728-2472867d2472",
    "publicKey": "string",
    "serverIp": "string",
    "hostname": "string",
    "version": "string",
    "domain": "string"
  }'
```

## GET /api/v1/install/script

The one-step installer script (docker/install.sh), baked into the image. X-Institflow-Script-Sha256 lets a careful customer compare before running it.

- Operation id: `InstallClaimController_script_v1`
- Permission: —
- Auth: public (no credential)
- `Idempotency-Key`: not required

### Responses

**200** — The installer script, as a Bash file.

Every other status answers with the shared `ErrorEnvelope` — see
https://docs.institflow.com/md/en/error-codes.md

### Example request

```bash
curl -X GET "https://your-institute.example/api/v1/install/script" \
  -H "Authorization: Bearer $INSTITFLOW_API_KEY"
```
