Skip to main content
POST
Give one HTTP port of a sandbox an HTTPS URL, public or private.

Authorizations

Authorization
string
header
required

Opaque instabox access token (1 hour). Refresh with /v1/auth/refresh (refresh token valid 30 days, rotates on use).

Path Parameters

id
string
required

Sandbox ID (m_ + 26 lowercase base32 characters).

Pattern: ^m_[a-z2-7]{26}$

Body

application/json
port
integer
required

Desktop port 5901 and Orca port 6768 (plus the configured Orca port) are reserved.

Required range: 1024 <= x <= 65535
name
string

Omitted: the current name, or "Port N" for a new port.

Maximum string length: 100
protocol
enum<string>

Omitted: the current protocol, or http for a new port. tcp publishes a raw TCP service behind TLS when the server enables it (403 otherwise; admins only while in preview); paid plans only, at most 5 per org by default (429). A port already published with the other protocol answers 409 until it is unpublished. A tcp port cannot be private (400).

Available options:
http,
tcp
access
enum<string>

Omitted: the current access, or public for a new port. Changing it ends the old publication's connections. private is for http ports only.

Available options:
public,
private
rotateToken
boolean

With a private port: a new token, returned in the response; connections that used the old one close. 400 for a public port.

Response

The port was already published; its name, access or token is updated when asked.

id
string
required

The publication's ID; a new one after an unpublish, an access change or a token rotation. The URL does not change.

machineId
string
required
port
integer
required
name
string
required
url
string<uri>
required

https://<port>-<sandbox>.<domain> for http, tls://<address> for tcp. Empty when public ports (or raw TCP ports) are not configured.

access
enum<string>
required

public: anyone with the URL. private: only requests that carry the port's token (_token query parameter once, the cookie it sets, or Authorization: Bearer).

Available options:
public,
private
createdAt
string<date-time>
required
protocol
enum<string>

http: an HTTPS URL. tcp: a raw TCP service behind TLS at address, routed by SNI, always public (docs/public-ports.md, "Raw TCP ports").

Available options:
http,
tcp
address
string

tcp only: the TLS endpoint host:port; the client must send the host as SNI. psql: host=<host> port=<port> sslmode=require.

token
string

A private port's token (ibp_...), only in the publish response that created or rotated it.

tokenUrl
string<uri>

url with ?_token=<token>: the link to share. Present with token.

expiresAt
null
deprecated

Always null (public ports do not expire); kept for older in-guest instabox-port agents.