---
title: "Update VPN server"
method: POST
path: "/vpn/servers/update"
tags: ["VPN"]
---

# Update VPN server

`POST /vpn/servers/update`

## Request

- Base URL: `https://demo.onlinebillingform.com/api/v2`
- URL: `https://demo.onlinebillingform.com/api/v2/vpn/servers/update`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/billingserv/apis/billingserv-api-v2/docs/vpn/servers/update/post.ts> (a function with typed inputs; its response is checked against the schema)

Use this BillingServ API endpoint to update VPN server. Review the response for the operation result or validation errors.

## Request body

- object
  - `id` integer, required
  - `country_id` integer, required
  - `server_name` string, required
  - `ip_address` string, ipv4, required
  - `ssh_port` integer, required
  - `ssh_username` string, required
  - `ssh_password_current` string, password, required
  - `max_connection` integer, required
  - `vpn_type` integer
  - `ssh_password_new` string
  - `vpn_port` string: default, random, or custom
  - `vpn_custom_port` string
  - `vpn_protocol` string: udp or tcp

## Response `200`

OK

- ApiResponse
  - `success` boolean

## Other responses

- `400`: The request could not be processed.
- `401`: Missing or invalid API key
- `403`: Authenticated key does not have permission for this endpoint
- `404`: The requested resource was not found or is not available to this API account.
- `422`: Validation error
- `500`: The server could not complete the request.

## Changes

- **2026-08-22** `6b9208b64456`: 9 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the non-success response with the status `500`
  - added the optional property `code` to the response with the `401` status
  - …5 more

[Operation history](https://skmtc.dev/billingserv/apis/billingserv-api-v2/changes/vpn/servers/update/post.md)

---

[API](https://skmtc.dev/billingserv/apis/billingserv-api-v2.md) - [All operations](https://skmtc.dev/billingserv/apis/billingserv-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/billingserv/apis/billingserv-api-v2/revisions/232ab5ca8413?raw)
