---
title: "POST /api/vpn-instances"
method: POST
path: "/api/vpn-instances"
tags: ["VpnInstances"]
---

# POST /api/vpn-instances

`POST /api/vpn-instances`

## Request

- Base URL: `https://api-admin.hackgate.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api-admin.hackgate.io/api/vpn-instances`
- Auth: HTTP bearer

## Request body

- CreateVpnInstanceRequest
  - `name` string, required
  - `privateNetwork` string, required
  - `targetType` string, required
  - `target` string, required
  - `includeSubdomains` boolean
  - `protocol` string, nullable
  - `ports` string, nullable
  - `dnsZone` string, nullable
  - `dnsResolvers` string[], nullable

## Response `200`

OK

- VpnEnvironmentDetailsDto
  - `instance` VpnInstance
    - `id` string, nullable
    - `orgId` string, nullable
    - `name` string, nullable
    - `isActive` boolean
    - `creationDate` string, date-time
    - `createdByUserId` string, nullable
    - `startDate` string, date-time, nullable
    - `stopDate` string, date-time, nullable
    - `instructions` string, nullable
    - `lastProvisionedAt` string, date-time, nullable
    - `openVpnRulesetId` integer, nullable
    - `auditRetentionDays` integer
  - `privateNetworks` VpnPrivateNetwork[], nullable
    - `id` string, nullable
    - `vpnInstanceId` string, nullable
    - `cidr` string, nullable
    - `createdAt` string, date-time
  - `targets` VpnTarget[], nullable
    - `id` string, nullable
    - `vpnInstanceId` string, nullable
    - `type` string, nullable
    - `value` string, nullable
    - `includeSubdomains` boolean
    - `protocol` string, nullable
    - `ports` string, nullable
    - `isActive` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `dnsZones` VpnDnsZoneDto[], nullable
    - `id` string, nullable
    - `vpnInstanceId` string, nullable
    - `zone` string, nullable
    - `resolvers` string[], nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
  - `connectors` VpnConnectorStatusDto[], nullable
    - `id` string, nullable
    - `role` string, nullable
    - `status` string, nullable
    - `isRouteOwner` boolean
    - `version` string, nullable
    - `tunnelAddress` string, nullable
    - `configRevision` integer
    - `diagnostics` string, nullable
    - `lastSeenAt` string, date-time, nullable
    - `enrollmentExpiresAt` string, date-time, nullable
    - `enrollmentUsedAt` string, date-time, nullable
  - `certificateAuthorities` VpnCertificateAuthorityDto[], nullable
    - `id` string, nullable
    - `name` string, nullable
    - `sha256Fingerprint` string, nullable
    - `notBefore` string, date-time
    - `notAfter` string, date-time
    - `version` integer
    - `isCurrent` boolean
    - `replacedAt` string, date-time, nullable
    - `createdAt` string, date-time
  - `readiness` string, nullable

## Changes

- **2026-09-19** `378d74580c23`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hackgate/apis/hackgate-admin-api/changes/api/vpn-instances/post.md)

---

[API](https://skmtc.dev/hackgate/apis/hackgate-admin-api.md) - [All operations](https://skmtc.dev/hackgate/apis/hackgate-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hackgate/apis/hackgate-admin-api/revisions/4001be3c2ed0?raw)
