Serves a port the sandbox listens on at its own URL. A public port
answers anyone. A private one needs a sandbox token, in
Authorization: Bearer or once as ?pyo_token= in a browser.
API key access: sandboxes.
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.
id*stringThe sandbox's id.
application/jsonport*integerThe port the sandbox listens on, like 3000.
int320 <= valuepublic?|Whether anyone can open the URL. A private port needs a sandbox token. True when left out.
url, port and public.
application/jsoncurl -X POST 'https://your-pyo.example.com/api/v1/sandboxes/string/ports' \
-H 'Content-Type: application/json' \
-d '{
"port": 0
}'{}