Skip to navigation

Get the address of an exposed port

Returns a URL on the vendor’s network for a port inside the sandbox, and the headers you must send with every request to it. The port must have been listed in ports at create. Start your server in the sandbox first, for example with a background exec.

Traffic goes straight from you to the vendor. Meadow is not in the path, so the port stays reachable while Meadow is down. HTTP only. WebSocket has not been checked on either vendor.

The URL and headers together are a credential: anyone holding them can reach the port until expires_at. Do not log them. Call this again for a fresh one.

The vendors differ. Daytona returns a token header and a null expires_at. Modal returns an Authorization bearer header and an expires_at about 24 hours ahead.

Scope: sandboxes.

curl -sS "$MEADOW_BASE_URL/v1/sandboxes/$SANDBOX_ID/ports/8000" \
-H "Authorization: Bearer $MEADOW_API_KEY"

Authentication

AuthorizationBearer

A Meadow API key, sent as Authorization: Bearer mdw_.... The header x-api-key: mdw_... is accepted in its place.

Path parameters

sandbox_idstringRequired

The sandbox id returned by POST /v1/sandboxes. It must belong to the key’s project.

portintegerRequired

A port number from 1 to 65535 that was listed in ports at create.

Response headers

x-request-idstringOptional

Meadow’s id for this request, req_ and 24 hex characters. Every response carries it, including errors, streams and unknown routes. Every error in the Error schema repeats it as request_id. Quote it when you report a problem.

Response

Where to reach the port.
portinteger
The port inside the sandbox.
urlstringformat: "uri"
The address on the provider's network. Send HTTP requests here.
headersmap from strings to stringsOptional

Send these with every request to url. Empty when the provider needs none.

expires_atdatetime or nullOptional
When the URL and headers stop working. Null when the provider gives no expiry.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error