sandboxes
Ports & preview
Expose a guest port as a public HTTPS preview URL.
After starting a server inside the sandbox (e.g. on :8787):
REST
curl -fsS -X POST "$FYSTASH_API/v1/rooms/$ROOM/sandboxes/$AGENT/ports" \
-H "Authorization: Bearer $FYSTASH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"port":8787}'
# → { "url": "https://api.fystash.ai/p/{vm_id}/8787/", "port": 8787 }Unexpose:
curl -fsS -X DELETE "$FYSTASH_API/v1/rooms/$ROOM/sandboxes/$AGENT/ports/8787" \
-H "Authorization: Bearer $FYSTASH_API_KEY"Destroy clears preview routes for that VM.
Limits
- HTTP only; ports 1024–65535 (reserved ports like 22 denied)
- ≤4 ports per sandbox
- URL secrecy (
vm_idin the path) is the MVP auth model
MCP
sandbox_expose_port / sandbox_unexpose_port when available in your fystash-mcp version.