---
title: "Create a VM"
method: POST
path: "/{org_slug}/vms"
tags: ["VMs"]
---

# Create a VM

`POST /{org_slug}/vms`

## Request

- Base URL: `https://api.obelinf.com`
- URL: `https://api.obelinf.com/{org_slug}/vms`
- Auth: HTTP bearer

Create a VM

## Path parameters

- `org_slug` string, required

## Request body

- object
  - `name` string, required
  - `slug` string, required
  - `cluster_id` string
  - `device_id` string
  - `disk` number
  - `memory` number
  - `notes` string
  - `os` string
  - `status` 'active' | 'stopped' | 'suspended'
  - `vcpus` number

## Response `201`

VM created

- object
  - `tags` object[], required
    - `id` string, required
    - `tag_id` string, required
    - `tag_name` string, required
    - `tag_color` string, nullable
  - `vm` object, required
    - `created_at` string, required
    - `disk` number, required
    - `id` string, required
    - `memory` number, required
    - `name` string, required
    - `slug` string, required
    - `status` 'active' | 'stopped' | 'suspended', required
    - `updated_at` string, required
    - `vcpus` number, required
    - `cluster_id` string, nullable
    - `cluster_name` string, nullable
    - `device_id` string, nullable
    - `device_name` string, nullable
    - `notes` string, nullable
    - `os` string, nullable
    - `primary_ip_address` string, nullable
    - `primary_ip_id` string, nullable

## Other responses

- `400`: Validation error
- `403`: Feature not available
- `404`: Not found
- `409`: Conflict

---

[API](https://skmtc.dev/obelinf/apis/obelinf-api.md) · [All operations](https://skmtc.dev/obelinf/apis/obelinf-api/llms.txt) · [OpenAPI document](https://skmtc.dev/obelinf/apis/obelinf-api/revisions/463fcf791828?raw)
