---
title: "Create a computer"
method: POST
path: "/api/v0/computers"
tags: ["Computers"]
---

# Create a computer

`POST /api/v0/computers`

Creates a computer. Managed computers are returned in a provisioning state and set up asynchronously; BYOM computers register an existing machine and are active immediately.

## Request body

- CreateComputerRequestBody
  - `name` string, required
  - `provider` string
  - `hostId` string, uuid
  - `remoteUser` string
  - `repos` string[]
  - `autoInstallDeps` boolean
  - `serviceAccountId` string
  - `source` union
    - object
      - `kind` 'template', required
      - `templateId` string, required
    - object
      - `kind` 'computer', required
      - `sourceComputerId` string, required

## Response `201`

Response for status 201

- CreateComputer201ResponseBody
  - `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
- `402` — Response for status 402
- `403` — Response for status 403
- `500` — Response for status 500

## Changes

- **2026-08-05** `b702af89bbff` — 1 info
  - added the optional property `isListed` to the response with the `201` status
- **2026-07-31** `0383294a9870` — 3 breaking
  - removed `subschema #1, subschema #2` from the `provider` request property `anyOf` list
  - the `provider` request property's minLength was increased from `0` to `1`
  - the `provider` request property type/format changed from ``/`` to `string`/``
- **2026-07-26** `749e76236673` — 3 breaking, 3 info
  - removed the enum value `byom` of the request property `provider`
  - removed the enum value `e2b` of the request property `provider`
  - the `provider` request property type/format changed from `string`/`` to ``/``
  - added `subschema #1, subschema #2` to the `provider` request property `anyOf` list
  - …2 more

[Change history](https://skmtc.dev/factory/apis/factory-public-api/changes/api/v0/computers/post.md)

---

[API](https://skmtc.dev/factory/apis/factory-public-api.md) · [All operations](https://skmtc.dev/factory/apis/factory-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/factory/factory-public-api/revisions/b702af89bbff/schema)
