> ## Documentation Index
> Fetch the complete documentation index at: https://www.billingserv.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List VPN connections

> Returns the authenticated account's VPN connections. Customer API keys are supported; staff keys are denied. The bearer token determines the account, and id or customer_id query parameters cannot select another customer. No query parameters or request body are required. Results are not paginated and include pending reservations because they consume connection slots. Connection date and time record profile provisioning, not live tunnel activity. Compare each id with the connection_id saved from POST /vpn/connection/get to flag the current device. To disconnect another connection, send its id as connection_id to POST /vpn/disconnect; ownership checks still apply. VPN profile contents and server credentials are excluded.



## OpenAPI

````yaml /api-reference/openapi.json get /vpn/connections/list
openapi: 3.1.0
info:
  title: BillingServ API V2
  description: >-
    Resources and tools for developers to integrate with the BillingServ v2 API,
    including customer management, domain availability, hosted checkout,
    billing, and service operations. Authenticated API responses include
    X-Request-ID and X-API-Version: 2 headers, and rate-limited endpoints expose
    standard rate-limit headers and return 429 when a limit is exceeded. Clients
    may provide X-Request-ID for request correlation. The supported idempotent
    write operations accept Idempotency-Key. Internal service-to-service routes
    are intentionally excluded from this public contract. v1 is deprecated; use
    the v2 base URL and bearer-token authentication unless an endpoint states
    otherwise.
  version: '2.0'
servers:
  - url: https://demo.onlinebillingform.com/api/v2
    description: BillingServ demo API
security:
  - bearerAuth: []
tags:
  - name: Customer
  - name: Package
  - name: Group
  - name: Country
  - name: County
  - name: Currency
  - name: VPN
  - name: Invoice
  - name: Order
  - name: Module
  - name: Report
  - name: Marketing
  - name: Setting
  - name: Checkout
  - name: Domain
    description: Search enabled domain extensions and check domain availability.
  - name: Usage
  - name: Support
  - name: Licensing
  - name: Webhooks
    description: Outbound events sent by BillingServ to a configured customer endpoint.
paths:
  /vpn/connections/list:
    get:
      tags:
        - VPN
      summary: List VPN connections
      description: >-
        Returns the authenticated account's VPN connections. Customer API keys
        are supported; staff keys are denied. The bearer token determines the
        account, and id or customer_id query parameters cannot select another
        customer. No query parameters or request body are required. Results are
        not paginated and include pending reservations because they consume
        connection slots. Connection date and time record profile provisioning,
        not live tunnel activity. Compare each id with the connection_id saved
        from POST /vpn/connection/get to flag the current device. To disconnect
        another connection, send its id as connection_id to POST
        /vpn/disconnect; ownership checks still apply. VPN profile contents and
        server credentials are excluded.
      operationId: GET_vpn_connections_list
      responses:
        '200':
          description: Customer connection records and the configured connection allowance
          headers:
            X-Request-ID:
              description: Request correlation identifier.
              schema:
                type: string
            X-API-Version:
              schema:
                type: string
                const: '2'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - success
                  - connections
                  - current_connections
                  - max_allowed
                properties:
                  success:
                    type: boolean
                    const: true
                  connections:
                    type: array
                    description: >-
                      All connection records belonging to the authenticated
                      account, including pending reservations, ordered by
                      descending connection ID. Empty when the account has no
                      connections.
                    items:
                      type: object
                      additionalProperties: false
                      required:
                        - id
                        - device_info
                        - server_id
                        - server_name
                        - vpn_type
                        - connected_date
                        - connected_time
                        - created_at
                      properties:
                        id:
                          type: integer
                          description: >-
                            Connection ID. Compare with the connection_id saved
                            from POST /vpn/connection/get to identify the
                            current device. Send this value as connection_id to
                            POST /vpn/disconnect to disconnect this connection.
                        device_info:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Device label supplied when connecting, or detected
                            from the user agent. May be null for older
                            connections.
                          example: iPhone 16
                        server_id:
                          type: integer
                          description: ID of the VPN server assigned to this connection.
                        server_name:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Assigned server name. Null when the associated
                            server record is unavailable.
                          example: UK 01
                        vpn_type:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Connection protocol, such as openVPN, wireguard, or
                            amneziawg. Pending reservations use the assigned
                            server protocol when available. Null when neither
                            record has a protocol.
                          example: wireguard
                        connected_date:
                          type:
                            - string
                            - 'null'
                          format: date
                          description: >-
                            Profile provisioning date in the application
                            timezone. Null until provisioning completes.
                          example: '2026-10-25'
                        connected_time:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Profile provisioning time in HH:mm:ss format in the
                            application timezone. Null until provisioning
                            completes.
                          example: '12:34:56'
                        created_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: >-
                            Connection reservation creation timestamp with
                            timezone offset. May be null for older records.
                          example: '2026-10-25T12:34:00+00:00'
                  current_connections:
                    type: integer
                    minimum: 0
                    description: >-
                      Number of returned connection records, including pending
                      reservations that consume connection slots.
                  max_allowed:
                    type: integer
                    minimum: 0
                    description: >-
                      Tenant-wide per-customer connection limit. Returns 0 when
                      the global setting is missing or resolves to a
                      non-positive value.
              examples:
                connections:
                  summary: Provisioned connection and pending reservation, newest first
                  value:
                    success: true
                    connections:
                      - id: 21
                        device_info: MacBook Pro
                        server_id: 10
                        server_name: UK 01
                        vpn_type: wireguard
                        connected_date: null
                        connected_time: null
                        created_at: '2026-10-25T12:35:00+00:00'
                      - id: 20
                        device_info: iPhone 16
                        server_id: 10
                        server_name: UK 01
                        vpn_type: wireguard
                        connected_date: '2026-10-25'
                        connected_time: '12:34:56'
                        created_at: '2026-10-25T12:34:00+00:00'
                    current_connections: 2
                    max_allowed: 5
                empty:
                  summary: No connections
                  value:
                    success: true
                    connections: []
                    current_connections: 0
                    max_allowed: 5
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingToken:
                  value:
                    success: false
                    code: authentication_required
                    errors: Authorization token is required.
                    request_id: f773a950-9687-46a0-99d2-490513ba42ca
                invalidToken:
                  value:
                    success: false
                    code: invalid_api_key
                    errors: Invalid API Key
                    request_id: f773a950-9687-46a0-99d2-490513ba42ca
        '403':
          description: Staff API keys are not permitted to list VPN connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: insufficient_permissions
                errors: Insufficient permissions for this endpoint.
                request_id: f773a950-9687-46a0-99d2-490513ba42ca
        '429':
          description: Rate limit exceeded
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        errors:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
            - type: object
              additionalProperties: true
        code:
          type: string
          description: Machine-readable error category when provided.
        request_id:
          type: string
          description: Request identifier returned in the X-Request-ID response header.
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Use `Authorization: Bearer <live_api_key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.