← Back to Home

d3sk API Documentation

POST /api/connect

Establish a new WireGuard connection.

Request Body

{
  "agent_id": "string",          // Unique identifier for the agent
  "public_key": "string",        // Agent's WireGuard public key
  "connection_type": "Temporary" | "Permanent",
  "duration_minutes": number     // Optional, default 60 for Temporary
}

Response

{
  "connection_id": "uuid",
  "server_public_key": "string", // Server's WireGuard public key
  "server_endpoint": "string",   // Server's UDP endpoint (host:port)
  "client_ip": "string",         // Assigned IP (e.g., "10.100.0.2/32")
  "allowed_ips": "string",       // IPs to route through VPN
  "expires_at": "timestamp"      // ISO 8601 timestamp (optional)
}

GET /

Server status check.