Skip to main content
POST
Expose a port

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Headers

akua-context
string

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53
Example:

"ws_j572abc123def456"

Path Parameters

id
string
required

Sandbox id (sbx_...).

Pattern: ^sbx_[A-Za-z0-9]{1,64}$
Example:

"sbx_j572abc123def456"

Body

application/json
port
integer
required

The port a service in the sandbox listens on.

Required range: 1 <= x <= 65535
Example:

3000

visibility
enum<string>

link (the default): anyone with the URL can open it; the random token in the hostname is the only gate. private: the same hostname, but it needs Akua sign-in and the previews permission on the sandbox.

Available options:
link,
private
name
string

Readable part of the hostname. Defaults to preview.

Pattern: ^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$
Example:

"checkout"

Response

Port exposed

sandbox_id
string
required

Sandbox id (sbx_...).

Pattern: ^sbx_[A-Za-z0-9]{1,64}$
Example:

"sbx_j572abc123def456"

port
integer
required

The port a service in the sandbox listens on.

Required range: 1 <= x <= 65535
Example:

3000

visibility
enum<string>
required

link (the default): anyone with the URL can open it; the random token in the hostname is the only gate. private: the same hostname, but it needs Akua sign-in and the previews permission on the sandbox.

Available options:
link,
private
hostname
string
required

A host of its own under akua.run (<port>-<name>-<token>.akua.run), never shared with the dashboard or another preview.

Example:

"3000-checkout-k3x9q2m7a1b8c4d6.akua.run"

url
string
required
Example:

"https://3000-checkout-k3x9q2m7a1b8c4d6.akua.run/"

routed
boolean
required

True once the hostname answers. Until preview routing is live everywhere, a new preview is recorded but its URL does not answer yet.

created_by
object
required
created_at
integer
required

Exposure time (Unix seconds).

Required range: x >= 0