---
title: "Deploy instance"
method: POST
path: "/v1/instances"
tags: ["Instances"]
---

# Deploy instance

`POST /v1/instances`

Deploy a new instance.

Before deploying an instance, you need to add at least ssh key to be able to access your instance.

Instance types can be listed using the `GET /instance-types` endpoint.

Available images can be listed using the `GET /images` endpoint, using the `image_type` value from the result.

Existing detached OS volumes could be used as an image, put the volume ID as the `image` value.

It's also possible to define new volumes that will be created and attached to the new instance. New volumes location will be the same as the instance.

Existing detached volumes can be attached to the deployed instance by adding their IDs to the `existing_volumes` property.

## Headers

- `user-agent` string, required
- `cf-connecting-ip` string, required

## Request body

- DeployInstancePublicDto
  - `instance_type` string, required
  - `image` string, required — OS image specification for the created instance. There are two options: 1. OS image type. For a list of supported images, check `GET /images` endpoint, `"image_type"` property. To set the name and size, use `"os_volume"` property. 2. Previously customized OS volume ID. (To create an OS volume, first make an instance with existing `"image"` type. To customize the volume content, ssh into that instance. Finally, delete the instance but keep the volume.)
  - `ssh_key_ids` union
    - string, uuid
    - string[]
  - `startup_script_id` string
  - `hostname` string, required
  - `description` string, required
  - `tags` TagDto[] — Key-value tags for the new instance. Maximum 10. Omit `value` for a freeform tag. Keys are lowercased.
    - `key` string, required
    - `value` string — Omit for a freeform tag with no value
  - `location_code` string, required — Location code for the instance and any newly created volumes
  - `os_volume` OsVolumeDto
    - `name` string, required
    - `size` number, required
    - `on_spot_discontinue` 'keep_detached' | 'move_to_trash' | 'delete_permanently' — Optional, by default, nothing is deleted. Should we automatically delete, if instance is deleted because of spot? Allowed values: * `keep_detached` (default behavior, volume will be detached), * `move_to_trash` (will be deleted after 96 hours and counts towards the storage volume quota), * `delete_permanently` (will be deleted immediately).
    - `tags` TagDto[] — Key-value tags for the new volume. Maximum 10. Omit `value` for a freeform tag. Keys are lowercased.
      - `key` string, required
      - `value` string — Omit for a freeform tag with no value
  - `is_spot` boolean — Create a spot instance. Spot instances may be evicted by Verda at any time without warning.
  - `coupon` string
  - `volumes` VolumeDto[] — Additional (**non-OS**) volumes to create and attach to this new instance. (To configure **OS** volume, use `"image"` and `"os_volume"` properties.)
    - `name` string, required
    - `size` number, required
    - `on_spot_discontinue` 'keep_detached' | 'move_to_trash' | 'delete_permanently' — Optional, by default, nothing is deleted. Should we automatically delete, if instance is deleted because of spot? Allowed values: * `keep_detached` (default behavior, volume will be detached), * `move_to_trash` (will be deleted after 96 hours and counts towards the storage volume quota), * `delete_permanently` (will be deleted immediately).
    - `tags` TagDto[] — Key-value tags for the new volume. Maximum 10. Omit `value` for a freeform tag. Keys are lowercased.
      - `key` string, required
      - `value` string — Omit for a freeform tag with no value
    - `type` 'HDD' | 'NVMe' | 'HDD_Shared' | 'NVMe_Shared' | 'NVMe_Local_Storage' | 'NVMe_Shared_Cluster' | 'NVMe_OS_Cluster', required
  - `existing_volumes` string[] — IDs of additional existing detached volumes to attach to this new instance when its created. (To configure instance **OS** volume, use `"image"` and `"os_volume"` properties.)
  - `contract` 'LONG_TERM' | 'PAY_AS_YOU_GO' | 'SPOT'
  - `pricing` 'DYNAMIC_PRICE' | 'FIXED_PRICE' — This field is deprecated as DYNAMIC_PRICE is removed. Only FIXED_PRICE is supported now.

## Response `202`

Instance ID

## Other responses

- `503` — The requested instance type has no capacity in the selected location

---

[API](https://skmtc.net/datacrunch/apis/verda-cloud-public-api.md) · [All operations](https://skmtc.net/datacrunch/apis/verda-cloud-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datacrunch/verda-cloud-public-api/revisions/0d66c7340876/schema)
