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

# Server & VPN Config Endpoints

> List accessible servers and download VPN config files.

All endpoints require authentication. Users only see servers accessible by their active plan.

***

## GET /v1/servers

List all VPN servers the authenticated user can access.

**Response (200):**

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "New York #1",
      "country": "United States",
      "city": "New York",
      "protocol": "wireguard",
      "ip": "1.2.3.4",
      "status": "active"
    },
    {
      "id": 2,
      "name": "London #1",
      "country": "United Kingdom",
      "city": "London",
      "protocol": "openvpn",
      "ip": "5.6.7.8",
      "status": "active"
    }
  ]
}
```

***

## GET /v1/servers/{server}

Get details of a specific server.

**Path parameter:** `server` — server ID

**Response (200):**

```json theme={null}
{
  "success": true,
  "data": {
    "id": 1,
    "name": "New York #1",
    "country": "United States",
    "city": "New York",
    "protocol": "wireguard",
    "ip": "1.2.3.4",
    "status": "active"
  }
}
```

***

## GET /v1/servers/{server}/wireguard

Download the WireGuard `.conf` file for the authenticated user on this server.

**Path parameter:** `server` — server ID

**Response (200):**

Returns the `.conf` file as `text/plain`:

```ini theme={null}
[Interface]
PrivateKey = <user_private_key>
Address = 10.0.0.2/32
DNS = 1.1.1.1

[Peer]
PublicKey = <server_public_key>
Endpoint = 1.2.3.4:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
```

**Errors:**

* `403` — User's service does not grant access to this server
* `404` — Server not found or not a WireGuard server
* `423` — Service is suspended or bandwidth limit exceeded

***

## GET /v1/servers/{server}/openvpn

Download the OpenVPN `.ovpn` config file for this server.

**Path parameter:** `server` — server ID

**Response (200):**

Returns the `.ovpn` file as `text/plain`:

```
client
dev tun
proto udp
remote 1.2.3.4 1194
...
auth-user-pass
```

**Errors:**

* `403` — User's service does not grant access to this server
* `404` — Server not found or not an OpenVPN server
