---
title: "Update an instance"
method: PUT
path: "/compute/{connection_id}/instance/{id}"
tags: ["compute", "instance"]
---

# Update an instance

`PUT /compute/{connection_id}/instance/{id}`

## Request

- Base URL: `http://api.unified.to`
- URL: `http://api.unified.to/compute/{connection_id}/instance/{id}`
- Auth: API key in header `authorization`

## Path parameters

- `connection_id` string, required
- `id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- ComputeInstance
  - `id` string: Unique identifier for the instance
  - `created_at` string, date-time: When the instance was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the instance was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string: Display name of the instance
  - `type` 'CONTAINER' | 'VM' | 'BAREMETAL' | 'SANDBOX' | 'OTHER': The kind of compute unit
  - `status` 'PROVISIONING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'PAUSING' | 'PAUSED' | 'RESUMING' | 'RESTARTING' | 'TERMINATING' | 'TERMINATED' | 'PREEMPTED' | 'ERROR' | 'OTHER': Normalized lifecycle status; set on update to start, stop, pause, resume, restart or terminate
  - `status_reason` string: Vendor explanation of the current status (eg. shutdown or failure reason)
  - `allowed_actions` string[]: Lifecycle actions the vendor currently allows
  - `market` 'ON_DEMAND' | 'SPOT' | 'RESERVED' | 'COMMUNITY' | 'OTHER': Pricing market the instance runs in
  - `region_id` string: The region the instance runs in
  - `template_id` string: The template the instance was created from
  - `image` string: Container or OS image, when not created from a template
  - `source_snapshot_id` string: The snapshot the instance was restored or forked from
  - `parent_instance_id` string: The instance this one was forked from
  - `gputype_id` string: The GPU or instance type of this instance
  - `gpu_model` 'NVIDIA_GB300' | 'NVIDIA_B300' | 'NVIDIA_GB200' | 'NVIDIA_B200' | 'NVIDIA_GH200' | 'NVIDIA_H200' | 'NVIDIA_H100_SXM' | 'NVIDIA_H100_PCIE' | 'NVIDIA_H100_NVL' | 'NVIDIA_A100_SXM_80GB' | 'NVIDIA_A100_PCIE_80GB' | 'NVIDIA_A100_40GB' | 'NVIDIA_L40S' | 'NVIDIA_L40' | 'NVIDIA_L4' | 'NVIDIA_A40' | 'NVIDIA_A10' | 'NVIDIA_RTX_PRO_6000' | 'NVIDIA_RTX_6000_ADA' | 'NVIDIA_RTX_A6000' | 'NVIDIA_RTX_A5000' | 'NVIDIA_RTX_A4000' | 'NVIDIA_RTX_5090' | 'NVIDIA_RTX_4090' | 'NVIDIA_RTX_3090' | 'NVIDIA_V100' | 'NVIDIA_T4' | 'AMD_MI355X' | 'AMD_MI325X' | 'AMD_MI300X' | 'AMD_MI250' | 'OTHER': Normalized GPU model
  - `gpu_count` number: Number of GPUs attached (0 for CPU-only)
  - `sku` string: The vendor's own SKU or size name
  - `cpu_count` number: Number of vCPUs; may be fractional
  - `memory_mb` number: System memory in MiB
  - `disk_mb` number: Disk size in MiB
  - `architecture` 'X86_64' | 'ARM64' | 'OTHER': CPU architecture
  - `price_amount` number: List price for the instance
  - `price_unit` 'PER_GPU_HOUR' | 'PER_INSTANCE_HOUR' | 'OTHER': Unit that price_amount is quoted in
  - `currency` string: Currency of price_amount (ISO 4217)
  - `volume_ids` string[]: Volumes mounted on the instance
  - `endpoints` ComputeEndpoint[]: Exposed ports and their URLs
    - `port` number: The port inside the instance
    - `protocol` 'HTTP' | 'HTTPS' | 'TCP' | 'UDP' | 'OTHER': The protocol served on this port
    - `url` string: Public or proxied URL for this port
    - `is_auth_required` boolean: Whether the URL requires a vendor access token
  - `ssh` ComputeInstanceSsh: SSH connection details
    - `host` string: SSH host
    - `port` number: SSH port
    - `username` string: SSH username
  - `has_internet_access` boolean: Whether outbound network access is allowed
  - `timeout_seconds` number: Seconds until the instance expires; set on update to extend it
  - `expires_at` string, date-time: When the instance will expire (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `on_expire` 'TERMINATE' | 'PAUSE' | 'STOP' | 'OTHER': What happens when the instance expires
  - `idle_timeout_seconds` number: Seconds of inactivity before on_idle applies
  - `on_idle` 'TERMINATE' | 'PAUSE' | 'STOP' | 'OTHER': What happens when the instance is idle
  - `project_identifier` string: Vendor project, team or app that groups the instance (reference to TaskProject)
  - `service_id` string: The service (app) this instance runs for, on hosting platforms
  - `env` ComputeEnv[]: Environment variables (write-only values)
    - `name` string, required: Environment variable name
    - `value` string: Environment variable value (write-only; never returned)
  - `started_at` string, date-time: When the instance last started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `terminated_at` string, date-time: When the instance was terminated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `metadata` ComputeMetadata[]: Vendor labels, tags and metadata
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` unknown
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` unknown
  - `raw` unknown

## Response `200`

Successful

- ComputeInstance
  - `id` string: Unique identifier for the instance
  - `created_at` string, date-time: When the instance was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: When the instance was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `name` string: Display name of the instance
  - `type` 'CONTAINER' | 'VM' | 'BAREMETAL' | 'SANDBOX' | 'OTHER': The kind of compute unit
  - `status` 'PROVISIONING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'PAUSING' | 'PAUSED' | 'RESUMING' | 'RESTARTING' | 'TERMINATING' | 'TERMINATED' | 'PREEMPTED' | 'ERROR' | 'OTHER': Normalized lifecycle status; set on update to start, stop, pause, resume, restart or terminate
  - `status_reason` string: Vendor explanation of the current status (eg. shutdown or failure reason)
  - `allowed_actions` string[]: Lifecycle actions the vendor currently allows
  - `market` 'ON_DEMAND' | 'SPOT' | 'RESERVED' | 'COMMUNITY' | 'OTHER': Pricing market the instance runs in
  - `region_id` string: The region the instance runs in
  - `template_id` string: The template the instance was created from
  - `image` string: Container or OS image, when not created from a template
  - `source_snapshot_id` string: The snapshot the instance was restored or forked from
  - `parent_instance_id` string: The instance this one was forked from
  - `gputype_id` string: The GPU or instance type of this instance
  - `gpu_model` 'NVIDIA_GB300' | 'NVIDIA_B300' | 'NVIDIA_GB200' | 'NVIDIA_B200' | 'NVIDIA_GH200' | 'NVIDIA_H200' | 'NVIDIA_H100_SXM' | 'NVIDIA_H100_PCIE' | 'NVIDIA_H100_NVL' | 'NVIDIA_A100_SXM_80GB' | 'NVIDIA_A100_PCIE_80GB' | 'NVIDIA_A100_40GB' | 'NVIDIA_L40S' | 'NVIDIA_L40' | 'NVIDIA_L4' | 'NVIDIA_A40' | 'NVIDIA_A10' | 'NVIDIA_RTX_PRO_6000' | 'NVIDIA_RTX_6000_ADA' | 'NVIDIA_RTX_A6000' | 'NVIDIA_RTX_A5000' | 'NVIDIA_RTX_A4000' | 'NVIDIA_RTX_5090' | 'NVIDIA_RTX_4090' | 'NVIDIA_RTX_3090' | 'NVIDIA_V100' | 'NVIDIA_T4' | 'AMD_MI355X' | 'AMD_MI325X' | 'AMD_MI300X' | 'AMD_MI250' | 'OTHER': Normalized GPU model
  - `gpu_count` number: Number of GPUs attached (0 for CPU-only)
  - `sku` string: The vendor's own SKU or size name
  - `cpu_count` number: Number of vCPUs; may be fractional
  - `memory_mb` number: System memory in MiB
  - `disk_mb` number: Disk size in MiB
  - `architecture` 'X86_64' | 'ARM64' | 'OTHER': CPU architecture
  - `price_amount` number: List price for the instance
  - `price_unit` 'PER_GPU_HOUR' | 'PER_INSTANCE_HOUR' | 'OTHER': Unit that price_amount is quoted in
  - `currency` string: Currency of price_amount (ISO 4217)
  - `volume_ids` string[]: Volumes mounted on the instance
  - `endpoints` ComputeEndpoint[]: Exposed ports and their URLs
    - `port` number: The port inside the instance
    - `protocol` 'HTTP' | 'HTTPS' | 'TCP' | 'UDP' | 'OTHER': The protocol served on this port
    - `url` string: Public or proxied URL for this port
    - `is_auth_required` boolean: Whether the URL requires a vendor access token
  - `ssh` ComputeInstanceSsh: SSH connection details
    - `host` string: SSH host
    - `port` number: SSH port
    - `username` string: SSH username
  - `has_internet_access` boolean: Whether outbound network access is allowed
  - `timeout_seconds` number: Seconds until the instance expires; set on update to extend it
  - `expires_at` string, date-time: When the instance will expire (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `on_expire` 'TERMINATE' | 'PAUSE' | 'STOP' | 'OTHER': What happens when the instance expires
  - `idle_timeout_seconds` number: Seconds of inactivity before on_idle applies
  - `on_idle` 'TERMINATE' | 'PAUSE' | 'STOP' | 'OTHER': What happens when the instance is idle
  - `project_identifier` string: Vendor project, team or app that groups the instance (reference to TaskProject)
  - `service_id` string: The service (app) this instance runs for, on hosting platforms
  - `env` ComputeEnv[]: Environment variables (write-only values)
    - `name` string, required: Environment variable name
    - `value` string: Environment variable value (write-only; never returned)
  - `started_at` string, date-time: When the instance last started (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `terminated_at` string, date-time: When the instance was terminated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `metadata` ComputeMetadata[]: Vendor labels, tags and metadata
    - `id` string: The label, tag or metadata identifier
    - `slug` string: The label, tag or metadata key
    - `value` unknown
    - `namespace` string: The origin of the value (eg. labels, tags, metadata)
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'ARRAY' | 'OBJECT': The data type of the value
    - `extra_data` unknown
  - `raw` unknown

---

[API](https://skmtc.dev/unified/apis/unified-to-api-2.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api-2/revisions/7a38bdd7f089?raw)
