API Reference
All API endpoints require authentication via Clerk session cookie.
VMs
List VMs
GET /api/vms
Returns all VMs for the authenticated user.
Create VM
POST /api/vms
Content-Type: application/json
{ "name": "myproject" }
Delete VM
DELETE /api/vms/:id
Start VM
POST /api/vms/:id/start
Stop VM
POST /api/vms/:id/stop
Get VM status
GET /api/vms/:id/status
Polls the vmtree host for live status and updates the database.
Share VM
POST /api/vms/:id/share
Returns { shareUrl: "https://..." }.
Unshare VM
DELETE /api/vms/:id/share
SSH Keys
List keys
GET /api/ssh-keys
Add key
POST /api/ssh-keys
Content-Type: application/json
{ "label": "My MacBook", "publicKey": "ssh-ed25519 AAAA..." }
Remove key
DELETE /api/ssh-keys/:id
Integrations
List integrations
GET /api/integrations
Connect integration
POST /api/integrations
Content-Type: application/json
{ "provider": "github", "token": "ghp_..." }
Disconnect integration
DELETE /api/integrations/:id