Per-deploy preview URL
Give one specific build its own stable, shareable URL without making it the live version. POST enables the preview, DELETE disables it. The preview serves that exact deploy (its immutable bundle) at <deploy-uuid>.<your-plan-domain> — independent of which deploy is currently activated — so you can share a build for review before promoting it with activate.
Preview URLs are a static / fullstack-frontend feature. The URL serves once the build is ready (preview_url is empty until then) and stays valid until you disable the preview or the deploy's artifacts are pruned by retention. Each enabled preview takes one of the account's preview slots (max_preview_deploys, shared by all its apps; see cap below); turning one off frees it.
Who can open it: the app's preview visibility (private to the account's members by default), and then the protections of the app's primary endpoint: sign-in, IP and geo rules, firewall, rate limits (sharing the primary's counters), WAF, bot and traffic rules, HTTPS enforcement and edge functions. A primary that requires client certificates makes its previews answer 403; a paused or suspended primary refuses them; OAuth sign-in may not work on a preview host. Previews are never served from or stored in the edge cache. An app with no endpoint has no protections to apply. For a managed or function app, the preview reaches the backend that is live now. See Protections on preview URLs.
Response (200 OK)
true after POST, false after DELETE.ready.Errors
max_preview_deploys; "You've reached your plan's limit of … live previews — turn one off or upgrade your plan") — turn another one off first. Both methods: the account is suspended (code account_suspended).quota_paused), or the deploy is a branch preview that has expired ("This branch preview has expired — push to the branch again for a fresh preview"). Disabling is allowed on a paused app.Enable branch auto-previews
Opt a git-connected app into automatic branch previews. With it on, a push to any branch other than the deploy branch builds a preview deploy instead of touching production — the preview never becomes the live version. It's off by default. This applies to static and fullstack-frontend apps (a fullstack preview builds only the static frontend; API paths still hit the app's live backend).
Request body
true to auto-build a preview on every non-deploy-branch push; false to turn it off.Response (200 OK)
Errors
quota_paused).max_preview_deploys): a push at the cap turns off the account's oldest previews to make room. Branch previews expire 7 days after their push and are cleaned up automatically. Read the current setting from the webhook info endpoint (auto_preview).
List branch previews
List the app's live branch previews (branch previews with the preview on and not pruned), newest first — normally the latest preview per branch. Each entry carries both a stable branch-alias URL (always points at that branch's newest preview) and the immutable per-deploy URL (that exact build), plus branch, status and expiry. Manual per-deploy previews are not listed here; they show as preview_enabled in List Deploys. account_previews and cap let a UI show how many of the plan's live previews the whole account uses.
Response (200 OK)
[] when there are none.ready, building, …).ready.ready.null if it doesn't expire).cap (a branch counts once; manual per-deploy previews count too).