---
title: "Update a computer"
method: PATCH
path: "/api/v0/computers/{computerId}"
tags: ["Computers"]
---

# Update a computer

`PATCH /api/v0/computers/{computerId}`

Updates a computer's name or remote user. A host ID can be assigned to a computer that does not have one; host IDs are immutable once set and must be unique among the owner's computers.

## Path parameters

- `computerId` string, required — Computer ID

## Request body

- UpdateComputerRequestBody
  - `name` string
  - `hostId` string, uuid
  - `remoteUser` string

## Response `200`

Response for status 200

- UpdateComputer200ResponseBody
  - `id` string, required
  - `hostId` string, uuid
  - `name` string, required
  - `isListed` boolean
  - `providerType` string, required — Compute provider backing this computer, e.g. 'byom' or 'e2b'.
  - `status` 'provisioning' | 'active' | 'error'
  - `createdAt` number, required
  - `provisioningSteps` object[]
    - `id` string, required
    - `name` string, required
    - `status` string, required
    - `error` string
    - `startedAt` number
    - `completedAt` number
    - `installSessionId` string
  - `relayClientUrl` string, uri
  - `relayAgentUrl` string, uri
  - `remoteUser` string
  - `clonedRepoDirectories` string[]
  - `ownerPrincipalKind` string
  - `ownerId` string
  - `computerSource` union
    - object
      - `kind` 'template', required
      - `templateId` string, required
    - object
      - `kind` 'computer', required
      - `computerId` string, required

## Other responses

- `400` — Response for status 400
- `401` — Response for status 401
- `403` — Response for status 403
- `404` — Response for status 404
- `409` — Response for status 409
- `500` — Response for status 500

---

[API](https://skmtc.net/factory/apis/factory-public-api.md) · [All operations](https://skmtc.net/factory/apis/factory-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/factory/factory-public-api/versions/684f94d47ca9/schema)
