---
title: "Create deployment"
method: POST
path: "/preview/v2/deployments"
tags: ["Deployments"]
---

# Create deployment

`POST /preview/v2/deployments`

> ⚠️ This endpoint is in [public preview](/preview/roadmap).

Create a deployment for bulk node management.

## Request body

- SfcApiCreateDeploymentRequest
  - `name` string
  - `capacity` string, required — A resource path like 'sfc:capacity:acme:prod:my-capacity' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
  - `instance_template` string, required — A resource path like 'sfc:instance_template:acme:prod:my-instance_template' _or_ an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.
  - `target_instance_count` integer, required
  - `instance_name_template` string — A name template using {{variable}} syntax. Available variables: {{adjective}} (~128 random adjectives), {{noun}} (~128 random nouns), {{nanoid(N)}} (N-character alphanumeric identifier, 1 ≤ N ≤ 21). The template must produce enough unique combinations to avoid collisions — equivalent to at least the default template {{adjective}}-{{noun}}-{{nanoid(6)}} (~1 quadrillion possibilities). Must start with an alphanumeric character. Resolved names are limited to 255 characters.

## Response `201`

Deployment created.

- SfcApiDeploymentResponse
  - `id` string, required
  - `resource_path` string, required — A resource path for a deployment resource. Format: sfc:deployment:<account>:<workspace>:<name>.
  - `owner` string, required
  - `workspace` string, required
  - `name` string, required
  - `object` 'deployment', required
  - `capacity` SfcApiCapacitySummary, required
    - `id` string, required
    - `name` string, required
  - `instance_template` SfcApiInstanceTemplateSummary, required
    - `id` string, required
    - `name` string, required
  - `target_instance_count` integer, required
  - `instance_name_template` string, required — A name template using {{variable}} syntax. Available variables: {{adjective}} (~128 random adjectives), {{noun}} (~128 random nouns), {{nanoid(N)}} (N-character alphanumeric identifier, 1 ≤ N ≤ 21). The template must produce enough unique combinations to avoid collisions — equivalent to at least the default template {{adjective}}-{{noun}}-{{nanoid(6)}} (~1 quadrillion possibilities). Must start with an alphanumeric character. Resolved names are limited to 255 characters.
  - `status` SfcApiReconciliationStatus, required
    - `state` 'info' | 'warning' | 'error', required
    - `message` string, required
  - `created_at` integer, required — Unix timestamp.
  - `updated_at` integer, required — Unix timestamp.

## Other responses

- `400` — Deployment with this name already exists.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Capacity or node template not found.
- `422` — Validation failed.
- `500` — Internal server error.

---

[API](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation.md) · [All operations](https://skmtc.net/sfcompute/apis/san-francisco-compute-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sfcompute/san-francisco-compute-documentation/revisions/93dd7661e9bb/schema)
