Skip to main content
POST
Create a preview URL

Authorizations

Authorization
string
header
required

Personal byk_ API key; user-principal, resolved to a tenant by org context.

Headers

Idempotency-Key
string

Absent means server-generated, which provides no deduplication; only client-supplied keys dedupe.

Maximum string length: 255
X-Bonya-Organization-ID
string

Org context. Omitted means the caller's personal organization. A well-formed non-member org is 404; malformed is 400.

Path Parameters

sandbox_id
string
required

Body

application/json
port
integer
required
auth
enum<string>
default:private

private requires a grant token, exchanged once at the grant's exchange_url for a host-scoped cookie; public needs no token.

Available options:
private,
public
ttl_seconds
integer

Lifetime of the first grant of a private preview.

Required range: 0 <= x <= 31536000

Response

Existing preview (repeat of an earlier create)

id
string
required

Preview id, for example pv-e7otwsh2azaf2yzffkqlfcxyya.

sandbox_id
string
required
port
integer
required
auth
enum<string>
default:private
required

private requires a grant token, exchanged once at the grant's exchange_url for a host-scoped cookie; public needs no token.

Available options:
private,
public
url
string<uri>
required

Token-free preview URL.

created_by_user_id
string
required
created_at
string<date-time>
required
deleted_at
string<date-time>
grant
object