Makes a server's one-time join code and the command to run on it. The code works once, for 15 minutes. The command joins your tailnet, installs Pyo's sandbox daemon, checks what the server can run (Firecracker where it has KVM, gVisor elsewhere) and joins. Adding a server that hasn't joined yet again makes a new code. Team owners and admins. Needs Tailscale.
API key access: full.
apiKeyAuthorizationBearer <pyo_…>An API key from the dashboard's API keys page: Authorization: Bearer pyo_…. Keys can expire, and an expired one gets a 401.
application/jsonteamId?|The team whose server it is. Left out: the installation's, which every team may use (the installation's admin, in the dashboard).
name*stringIts name in Pyo and on your tailnet: lowercase letters, digits and dashes.
edgeDomain?|A domain whose wildcard points at the server, like sbx.example.com.
Sandbox ports are then served at <port>-<sandbox>.<domain> on
ports 80 and 443. Pyo gets the certificate for *.<domain> when the
team's Cloudflare connection covers the domain
(issueSandboxServerCertificate). Otherwise it goes in
/etc/pyo-sandbox/edge on the server.
server, command (run it on the server as root) and expiresAt (when the code runs out).
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/sandbox-servers' \
-H 'Content-Type: application/json' \
-d '{
"name": "string"
}'{}