Skip to navigation

Create a VPC

Creates an isolated virtual network. Requires scope: network.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
curl -X POST "https://api.ibee.ai/v1/networking/vpcs?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "<name>", "site_id": "68b99bd78a8eda32ff3f16ea"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Headers

X-Idempotency-KeystringOptionalformat: "^[!-~]{1,256}$"1-256 characters

Retry key for this create. Send the same key and the same body on every retry. The key is scoped to organization, workspace and path.

  • Create completed: you get the original answer for 24 hours, even if the plan limit has since been reached.
  • Refused or never sent: nothing was created, so the key is free to use again, including with a corrected body.
  • Unknown outcome (timeout, server error, lost connection): 409 idempotency_in_progress with Retry-After. This usually lasts 30 seconds and at most 3 minutes. Keep retrying with the same key and body. The next retry returns the Reserved IP, subnet or NAT gateway. For a VPC, firewall group or port forward, it either creates the resource or answers 409 “already exists”.
  • Changed body, while the outcome is unresolved or after the create completed: 409 idempotency_conflict.
  • New key at the plan limit: 402.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
namestringRequired1-80 characters
Display name of the VPC.
site_idstringRequired1-120 characters

Required network placement site. Copy site_id from GET /networking/sites and choose an entry where available is true. Do not use a region name.

descriptionstringOptional<=500 charactersDefaults to
Optional description.
regionstring or nullOptional
Optional region label stored with the VPC.
cidrstring or nullOptional

RFC1918 IPv4 CIDR with a prefix between /22 and /28.

auto_cidrbooleanOptionalDefaults to true

Let the service choose a free CIDR when cidr is omitted. Default true.

create_default_subnetbooleanOptionalDefaults to true
Create a first subnet together with the VPC. Default true.
default_subnet_cidrstring or nullOptional

CIDR for that first subnet; chosen automatically when omitted.

is_defaultbooleanOptionalDefaults to false
Mark the VPC as the workspace's default VPC. Default false.
connectivity_typeenumOptionalDefaults to public

The VPC’s internet model; the server uses public when this is omitted. public keeps dedicated public IPs available to its VMs. private has no shared public edge, but a VM can still be given a Reserved IP. nat_gateway is a private VPC with managed outbound NAT and refuses dedicated public IPs.

Allowed values:

Response

VPC created successfully.
vpc_idstring
Unique ID of the VPC.
organization_idstring
ID of the owning organization.
workspace_idstring
ID of the owning workspace.
site_idstring
Site the VPC lives at.
namestring
Display name of the VPC.
cidrstring
IPv4 CIDR of the VPC.
statusenum

Lifecycle status of a VPC, subnet, NAT gateway or port-forwarding rule.

  • provisioning: being created.
  • available: ready for use.
  • error: the last change failed; see error_message.
  • deleting: being removed.
Allowed values:
connectivity_typeenum

The VPC’s internet model.

  • public: instances may have dedicated public IPs.
  • nat_gateway: private VPC with managed outbound NAT; dedicated public IPs are not allowed.
  • private: no managed internet path.
Allowed values:
created_atdatetime

When the resource was created (ISO 8601).

updated_atdatetime

When the resource was last changed (ISO 8601).

account_idstringOptional

Legacy alias of organization_id.

descriptionstringOptional
Description of the VPC.
regionstring or nullOptional
Region label stored with the VPC, when set.
is_defaultbooleanOptional
Whether this is the workspace's default VPC.
error_messagestring or nullOptional

Error detail when status is error.

node_countintegerOptional>=0
Number of VMs attached to the VPC.
nat_pricingobjectOptional
Price of a NAT gateway as recorded when it was created.
subnetslist of objectsOptional
Subnets in the VPC.
nat_gatewayslist of objectsOptional
NAT gateways in the VPC.
attached_nodeslist of objectsOptional
VMs attached to the VPC.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
413
Content Too Large Error
422
Unprocessable Entity Error
423
Locked Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error