API Endpoints¶
Complete reference for WireBuddy REST API.
Authentication¶
All endpoints require Bearer token authentication unless otherwise noted.
See API Authentication for details.
Base URL¶
Common Responses¶
Success (200 OK)¶
Created (201 Created)¶
Error (4xx, 5xx)¶
Interfaces¶
List Interfaces¶
Response:
{
"success": true,
"data": [
{
"name": "wg0",
"address": "10.8.0.1/24",
"listen_port": 51820,
"status": "active",
"peer_count": 12
}
]
}
Get Interface¶
Create Interface¶
Request:
Update Interface¶
Delete Interface¶
Start Interface¶
Stop Interface¶
Peers¶
List Peers¶
Query Parameters:
interface- Filter by interface namestatus- Filter by status (active, inactive, disabled)limit- Results per page (default: 50)offset- Pagination offset
Response:
{
"success": true,
"data": {
"peers": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "John's iPhone",
"interface": "wg0",
"ip": "10.8.0.2",
"status": "connected",
"last_handshake": "2026-03-15T14:30:00Z",
"transfer_tx": 1048576000,
"transfer_rx": 524288000
}
],
"total": 12,
"limit": 50,
"offset": 0
}
}
Get Peer¶
Create Peer¶
Request:
{
"name": "New Peer",
"interface": "wg0",
"ip": "10.8.0.10",
"routing_mode": "full_tunnel",
"persistent_keepalive": 25
}
Update Peer¶
Delete Peer¶
Get Peer Config¶
Response:
[Interface]
PrivateKey = <key>
Address = 10.8.0.2/32
DNS = 10.8.0.1
[Peer]
PublicKey = <key>
Endpoint = vpn.example.com:51820
AllowedIPs = 0.0.0.0/0, ::/0
PersistentKeepalive = 25
Generate QR Code¶
Returns PNG image of QR code.
DNS¶
Get DNS Settings¶
Update DNS Settings¶
Get Query Log¶
Query Parameters:
client- Filter by client namedomain- Filter by domainstatus- allowed or blockedlimit- Results per page (default: 100)offset- Pagination offset
Get DNS Statistics¶
Update Blocklists¶
Get Custom Rules¶
Add Custom Rule¶
Request:
Metrics¶
Get Dashboard Metrics¶
Get Peer Traffic¶
Query Parameters:
start- Start time (ISO 8601)end- End time (ISO 8601)resolution- hourly, daily, weekly
Get Geographic Stats¶
Users¶
List Users (Admin Only)¶
Get User¶
Create User (Admin Only)¶
Request:
{
"username": "newuser",
"email": "user@example.com",
"password": "SecurePassword123!",
"role": "user"
}
Update User¶
Delete User (Admin Only)¶
Settings¶
Get Settings (Admin Only)¶
Update Settings (Admin Only)¶
Rate Limits¶
| Endpoint Type | Authenticated | Unauthenticated |
|---|---|---|
| Read (GET) | 100/min | 10/min |
| Write (POST/PUT/DELETE) | 30/min | 5/min |
Pagination¶
Paginated endpoints support:
limit- Results per page (max 100)offset- Skip N results
Response includes:
Error Codes¶
| Code | Meaning |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing/invalid token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn't exist |
| 409 | Conflict - Resource already exists |
| 422 | Unprocessable Entity - Validation failed |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error |
SDKs & Libraries¶
Official SDKs (planned):
- Python:
wirebuddy-python - JavaScript:
wirebuddy-js
Community contributions welcome!
OpenAPI Specification¶
Download OpenAPI spec:
Next Steps¶
- Authentication Guide - Generate tokens
- API Overview - Getting started
- Security - API security best practices