buildVpsInstance
Stage an operating system install on a VPS instance. DESTRUCTIVE — ERASES ALL DATA on the server, including any deployed application, and cannot be undone. This is also how a reinstall works. Requires authentication. Required: instanceId (VPS instance ID), operatingSystemId (integer template id from listVpsOsTemplates). Optional: sshKeyIds (integer key ids from listMySshKeys — without one you may not be able to log in), hostname (defaults to the instance's current hostname), swap (256, 512, 768 in MB, or 1, 1.5, 2, 3, 4, 5, 6, 8 in GB). The install is asynchronous — afterwards poll getVpsInstanceDetails until buildState is COMPLETE. Returns an actionId — present the summary to the user, then call executeConfirmedAction with the actionId if they approve.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| swap | No | ||
| hostname | No | ||
| sshKeyIds | No | ||
| instanceId | Yes | ||
| sessionKey | No | Session key (osk_...) returned by checkDeviceLoginStatus. Pass it on every call when logged in via the in-chat device flow; omit when connected via OAuth. | |
| operatingSystemId | Yes |