Servera Virtual Router API

Virtual Routers - WireGuard, public IPs, attached VMs.

GitHub OpenAPI

Operations 10

GET /v1/virtual-routers List Virtual Routers #
GET /v1/virtual-routers/{service_id} Get Virtual Router #
GET /v1/virtual-routers/{service_id}/wireguard List WireGuard peers #
POST /v1/virtual-routers/{service_id}/wireguard Add WireGuard peer #
DELETE /v1/virtual-routers/{service_id}/wireguard/{peer_id} Remove WireGuard peer #
GET /v1/virtual-routers/{service_id}/public-ips List public IPs #
POST /v1/virtual-routers/{service_id}/public-ips Map a public IP #
GET /v1/virtual-routers/{service_id}/attachable-vms List attachable VMs #
POST /v1/virtual-routers/{service_id}/attach-vm Attach a VM #
POST /v1/virtual-routers/{service_id}/detach-vm Detach a VM #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/servera-co-uk:servera-co-uk-virtual-router-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

servera-co-uk-virtual-router-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Servera Developers Virtual Router API
  description: 'A REST API for your Servera account - the same operations you have in the customer

    area, available programmatically, plus an **MCP** endpoint so AI agents can use

    them as tools. Every request is authenticated with a scoped API key and rate-limited. ### What you can do

    Everything from your customer area, grouped by area (each needs the matching scope):


    - **VPS / VDS** - list servers; live status + CPU/RAM/disk/network metrics; power

    on/off/reboot; snapshots (create, roll back, delete); backups (create, delete);

    the per-VM firewall (view, enable/disable, rules add/update/delete/reorder - on

    standalone and behind-Virtual-Router VMs); and OS reinstall. - **VPC Networks** - list your private networks and manage their firewall (rules,

    options, VM↔VM isolation toggle). - **Virtual Routers** - overview, WireGuard peers, public-IP mappings, and

    attach/detach VMs behind the router. - **Domains & DNS** - list domains (nameservers, lock, DNSSEC, expiry) and read or

    edit DNS records (A, AAAA, CNAME, MX, TXT, SRV, CAA) on all DNS zones

    hosted with us. - **WAF** - list protected domains, enable/disable protection, toggle threat

    filtering, apply security presets, advanced rules, bot policy, IP/country

    allow-block lists, and read traffic logs. - **Email - delivery & protection** - delivery trace, RBL/blocklist checks, the

    RBL self-whitelist, trusted senders, and autoresponders. - **Billing** - list invoices, download their PDFs, and check your account balance. - **Orders** - list and inspect your orders. - **Support** - read tickets, open new ones, and post replies. - **IP protection** - check whether an IP is blocked on shared hosting, self-unblock

    it, and view the history. - **Users** - list account users, invite new ones, and resend invitations. - **Contacts** - list and manage your account contacts. - **Tags & comments** - organise your services and domains with tags (a predefined

    grouped catalog of international labels, or your own custom text) and a free-text

    comment on each; find services/domains by tag. Scopes `tags:read`/`tags:write`. - **System emails** - the transactional emails we''ve sent to your account. - **Activity log** - your account''s audited actions. ## Base URL

    ```

    https://developers.servera.lt

    ```

    Every `servera.*` brand has its own host (e.g. `https://developers.servera.co.uk`);

    they share this API. ## Quick start

    ```bash

    # Public - no auth

    curl https://developers.servera.lt/v1/status


    # Authenticated - list your VPS/VDS

    curl https://developers.servera.lt/v1/vps \

    -H "Authorization: Bearer sk_live_…"

    ```


    ## Authentication

    Create a scoped API key in your customer area (**Developers → API keys**), then

    send it as a bearer token on every request:

    ```

    Authorization: Bearer sk_live_…

    ```

    Keys are shown **once** at creation (only a hashed form is stored) and can be

    revoked anytime. Send keys over HTTPS only, in the header - never in a URL.'
  version: 1.0.0
servers:
- url: https://developers.servera.co.uk
  description: Production
tags:
- name: Virtual Router
  description: Virtual Routers - WireGuard, public IPs, attached VMs.
paths:
  /v1/virtual-routers:
    get:
      tags:
      - Virtual Router
      summary: List Virtual Routers
      description: List your Virtual Routers.
      operationId: list_virtual_routers
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                virtual_routers:
                - service_id: 14700
                  label: router1
                  status: active
                  vr_status: active
                  plan: vr-small
                  wan_ip: 185.209.138.50
                  wan_ip6: 2a0e:1200::50
      security:
      - ApiKey: []
  /v1/virtual-routers/{service_id}:
    get:
      tags:
      - Virtual Router
      summary: Get Virtual Router
      description: Virtual Router overview - WAN, WireGuard peers, public-IP mappings, quota.
      operationId: get_virtual_router
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                service_id: 14700
                plan: vr-small
                status: active
                wan_ip: 185.209.138.50
                wan_ip6: 2a0e:1200::50
                wireguard:
                  port: 51820
                  peers:
                  - id: 1
                    name: laptop
                    allowed_ip: 10.80.7.2/32
                    created_at: '2026-06-01T10:00:00+00:00'
                public_ips:
                - id: 1
                  public_ip: 185.209.138.51
                  private_ip: 10.80.6.10
                  created_at: '2026-06-01T10:00:00+00:00'
                public_ipv4:
                  quota: 2
                  used: 1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/virtual-routers/{service_id}/wireguard:
    get:
      tags:
      - Virtual Router
      summary: List WireGuard peers
      operationId: list_wg_peers
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                peers:
                - id: 1
                  name: laptop
                  allowed_ip: 10.80.7.2/32
                  created_at: '2026-06-01T10:00:00+00:00'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      description: List the WireGuard peers configured on a Virtual Router.
    post:
      tags:
      - Virtual Router
      summary: Add WireGuard peer
      description: Add a WireGuard peer. If you omit `public_key`, one is generated and the config is returned once.
      operationId: add_wg_peer
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WgPeer'
            example:
              name: laptop
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                peer_id: 2
                name: phone
                client_ip: 10.80.7.3/32
                generated: true
                config: '[Interface]

                  PrivateKey=…

                  Address=10.80.7.3/32

                  [Peer]

                  …'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/virtual-routers/{service_id}/wireguard/{peer_id}:
    delete:
      tags:
      - Virtual Router
      summary: Remove WireGuard peer
      operationId: remove_wg_peer
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      - name: peer_id
        in: path
        required: true
        schema:
          type: integer
          title: Peer Id
        description: WireGuard peer id (from GET …/wireguard).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                removed: true
                peer_id: 2
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      description: Remove a WireGuard peer from a Virtual Router.
  /v1/virtual-routers/{service_id}/public-ips:
    get:
      tags:
      - Virtual Router
      summary: List public IPs
      operationId: list_public_ips
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                public_ips:
                - id: 1
                  public_ip: 185.209.138.51
                  private_ip: 10.80.6.10
                  created_at: '2026-06-01T10:00:00+00:00'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      description: List the public-IP → private-IP mappings on a Virtual Router.
    post:
      tags:
      - Virtual Router
      summary: Map a public IP
      description: Map a public IPv4 to a private IP behind the router (subject to your quota).
      operationId: add_public_ip
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicIpMap'
            example:
              private_ip: 10.80.6.10
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                success: true
                public_ip_id: 2
                public_ip: 185.209.138.52
                private_ip: 10.80.6.11
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/virtual-routers/{service_id}/attachable-vms:
    get:
      tags:
      - Virtual Router
      summary: List attachable VMs
      operationId: attachable_vms
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                vms:
                - service_id: 14684
                  name: web1
                  hostname: web1.example.com
                  status: active
                  running: true
                  attached: false
                  private_ipv4: null
                  public_ipv4: 185.209.138.106
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      description: List your VMs that can be moved behind this Virtual Router.
  /v1/virtual-routers/{service_id}/attach-vm:
    post:
      tags:
      - Virtual Router
      summary: Attach a VM
      description: Move one of your VMs behind this Virtual Router.
      operationId: attach_vm
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachVm'
            example:
              target_service_id: 14684
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                behind: true
                public_ipv4: 185.209.138.51
                private_ipv4: 10.80.6.10
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/virtual-routers/{service_id}/detach-vm:
    post:
      tags:
      - Virtual Router
      summary: Detach a VM
      description: Restore one of your VMs to standalone (public) networking.
      operationId: detach_vm
      security:
      - ApiKey: []
      parameters:
      - name: service_id
        in: path
        required: true
        schema:
          type: integer
          title: Service Id
        description: Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachVm'
            example:
              target_service_id: 14684
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
              example:
                public_ipv4: 185.209.138.106
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AttachVm:
      properties:
        target_service_id:
          type: integer
          title: Target Service Id
      type: object
      required:
      - target_service_id
      title: AttachVm
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    PublicIpMap:
      properties:
        private_ip:
          type: string
          title: Private Ip
      type: object
      required:
      - private_ip
      title: PublicIpMap
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WgPeer:
      properties:
        name:
          type: string
          title: Name
          default: device
        public_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Public Key
          description: Base64 WireGuard public key (44 chars, e.g. ends in '='). Omit to have a keypair generated and the config returned once. An invalid format is rejected with 400.
      type: object
      title: WgPeer
  securitySchemes:
    ApiKey:
      type: http
      description: 'Your `sk_live_…` API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer