API referenceSections

A live site's preview settings and what the plan allows

Generated from the OpenAPI contract. Sessions send the CSRF header on writes; API keys use a Bearer token. Authentication

GET /api/v1/tenants/{tid}/sites/{id}/preview-settings

A live site's preview settings and what the plan allows

Authentication: session cookie __Host-panel_session (contract default; see Authentication).

Parameters

NameInTypeRequiredDescription
tidpathstringrequired
idpathstringrequired

Responses

200 Settings

Content type: application/json

  • enabled boolean required
  • branches array<string> required

    Branch name patterns; * is any run of characters

  • pull_requests boolean required
  • gate string required
    Allowed values: "" "password" "panel"
  • gate_user string required
  • has_password boolean required
  • database string required
    Allowed values: "none" "empty" "copy"
  • database_id string required
  • idle_days integer required
    • minimum 1
    • maximum 90
  • env array<object> required
    • name string required
    • value string optional
    • secret boolean required
    • has_value boolean required
  • copy_env array<string> required

    Names of the live site's variables a preview gets; no other crosses

  • report boolean required

    Commit status and a pull request comment, with the connection's token

  • updated_at string (date-time) | null required
  • domain string required
  • available boolean required
  • reason string required

    Why previews cannot be made: PREVIEWS_NOT_SET_UP, PREVIEWS_NOT_IN_PLAN or PREVIEWS_NEED_GIT

  • limit integer required
  • used integer required
  • disk_mb integer required
  • max_copy_mb integer required
  • certificates boolean required
  • provider string required
Example
{
  "enabled": true,
  "branches": [
    "string"
  ],
  "pull_requests": true,
  "gate": "",
  "gate_user": "string",
  "has_password": true,
  "database": "none",
  "database_id": "string",
  "idle_days": 1,
  "env": [
    {
      "name": "string",
      "value": "string",
      "secret": true,
      "has_value": true
    }
  ],
  "copy_env": [
    "string"
  ],
  "report": true,
  "updated_at": "2026-01-01T00:00:00Z",
  "domain": "string",
  "available": true,
  "reason": "string",
  "limit": 0,
  "used": 0,
  "disk_mb": 0,
  "max_copy_mb": 0,
  "certificates": true,
  "provider": "string"
}

default Error

Content type: application/json

  • code string required
  • message string required
  • details_redacted boolean required
  • correlation_id string required
  • retryable boolean required