---
title: "Create a VPC."
method: POST
path: "/v1/vpc"
tags: ["VPC"]
---

# Create a VPC.

`POST /v1/vpc`

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/v1/vpc`
- Auth: HTTP bearer

Provisions a VPC for the caller's project. Currently returns 501 —
enforcement and durable storage are a planned capability.

## Request body

- CreateVpcBody: Request body for `POST /v1/vpc`. Mirrors `scalix_vpc::CreateVpcRequest`. Documentation-only: the handler deserializes the external type directly, so these fields are read by utoipa, not by runtime code.
  - `name` string, required
  - `cidr` string, required: CIDR block for the VPC, e.g. `10.0.0.0/16`.

## Response `201`

VPC created

- VpcJson: A VPC. Mirrors `scalix_vpc::Vpc`.
  - `id` string, required
  - `tenant_id` string, required
  - `name` string, required
  - `cidr` string, required
  - `private_key` string, required
  - `public_key` string, required
  - `listen_port` integer, required
  - `endpoint` string, nullable
  - `status` string, required: One of `provisioning`, `active`, `degraded`, `deleting`.
  - `created_at` string, required

## Other responses

- `401`: Missing or invalid credentials
- `403`: Token lacks the vpc:write scope
- `500`: Internal error
- `501`: VPC provisioning not yet implemented

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
