Skip to main content
Expose ports from a box with public URLs. Each public URL maps to a specific port and can optionally require authentication.

Quickstart

Create a public URL

Start a web server inside your box and create a public URL to access it.

Add authentication

Protect your public URL with bearer token or basic authentication.

API

Create Public URL

Creates a public URL that exposes a port on your box. Returns the URL and authentication credentials if requested.

With Bearer Token

Add bearerToken: true to require an authorization header when accessing the public URL.

With Basic Authentication

Add basicAuth: true to require username and password when accessing the public URL.

With Both Auth Methods

Enable both authentication methods. Either one will work when accessing the public URL.

List Public URLs

Get all active public URLs for this box.

Delete Public URL

Remove a public URL by port number.

Behavior

One Public URL Per Port

Creating a public URL for a port that already has one will overwrite the previous one, including any auth credentials.

Public URL Lifecycle

Public URLs expire automatically when:
  • The box is paused
  • The box is deleted

Auto-Resume

Creating a public URL on a paused box automatically resumes it.

Examples

Expose an agent-built app

Let an agent build a web app, then create a public URL to test it.

Share a secure public URL

Create a public URL with authentication for sharing with team members.

Multi-port application

Create multiple public URLs for different services in the same box.

Temporary testing public URL

Create a public URL, run tests against it, then clean up.
The SDK still supports getPreviewUrl, listPreviews, and deletePreview, but they are deprecated aliases for getPublicURL, listPublicURLs, and deletePublicURL.