Sandboxes

Set who may open the sandbox's preview URLs and from which networks.

Changed on

The proxy applies the change within 30 seconds (its sandbox lookup cache). A visitor refused by the allow-list gets a 403 naming their address and this endpoint.

put/v1/sandboxes/{id}/preview-access

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

idstring required

Sandbox public id (sbx_...)

Request body

access'temps_login' | 'password' | 'public' required

temps_login | password | public. password is refused while the sandbox has no preview password (set one with PUT /v1/sandboxes/{id}/preview-password, which also selects it).

allowed_cidrsstring[] required

IPv4/IPv6 addresses or CIDRs allowed to open the preview URLs, at most 50. A single address is stored as a /32 or /128; a CIDR as its network address. Empty = any client address.

Response

Preview access updated

idstring required

Sandbox public id (sbx_...).

preview_access'temps_login' | 'password' | 'public' required

Who may open a sandbox's preview URLs (ADR-055 §11: sandboxes default to TempsLogin, never anonymous by default).

Stored on the sandbox row (sandboxes.preview_access). The sandbox's IP allow-list (sandboxes.preview_allowed_cidrs) is checked before any of these, so Public plus an allow-list means "anyone from these networks".

preview_allowed_cidrsstring[] required

Normalised CIDRs. Empty = any client address.

preview_password_hintstring nullable

Last 4 characters of the preview password, when one is set.

Changes