Skip to main content
POST
Returns a preview URL backed by a running service on the sandbox at the requested port. This powers multi-port preview tabs in the workspace UI. The endpoint is idempotent and self-healing:
  • Reconciles the DB state with the sandbox provider (handles raw-URL auto-resume).
  • Resumes the sandbox if the provider reports it as paused.
  • Starts or verifies the dev server (no-ops if already responding).
  • Persists session.preview_url and cached project metadata so Slack/agent callbacks can reuse the verified URL.
The list of available named services is exposed on the session’s services field (e.g. { "frontend": 3000, "postgres": 5432 }). Required scope: sessions:write

Path Parameters

string
required
The session ID.

Query Parameters

integer
required
The port number to expose. Must match a port the sandbox process is actually listening on.

Headers

string
required
Bearer token. Example: Bearer runtm_xxx
string
Required when the session belongs to an organization.

Response

string
Public preview URL pointing at the sandbox port.
integer
The port that was resolved.

Errors