API ReferenceSettings

Append Trusted Preview Hosts

Appends host patterns without replacing existing hosts. Returns 422 if any normalized pattern already exists or the resulting list exceeds 100 hosts. The entire request succeeds or fails together.

PATCH/v2/settings/preview-hosts

Hostname matching

PatternMatches
preview.example.comOnly that exact hostname.
*.example.comExactly one subdomain level, such as app.example.com; not a.b.example.com.
**.example.comOne or more subdomain levels, including app.example.com and a.b.example.com.

Neither wildcard includes example.com itself. Add the root domain as a separate pattern when needed. Wildcards must appear as *. or **. at the beginning, followed by at least two fixed hostname labels.

Use hostnames only, without a scheme, port, path, user information, query, or fragment. Patterns are normalized to lowercase, and at most 100 can be configured. See exact hosts and wildcards for examples and updating patterns for mutation behavior.

Adds patterns without replacing existing entries. Comparison uses exact normalized patterns: APP.example.com duplicates app.example.com, but app.example.com is distinct from *.example.com. Returns 422 for an existing pattern, repeated patterns in the request, an empty list, or a resulting list over 100 entries. The entire request fails without applying any additions.

Usage

TypeScript Example
import { v0 } from 'v0'const result = await v0.settings.appendPreviewHosts({  hosts: ['*.example.com'],})console.log(result)

API Signature

Request

Request Body

hosts: string[]

Distinct hostname patterns to append. Provide hostnames only, without scheme, port, path, userinfo, query, or fragment. *.example.com matches one subdomain label; **.example.com matches one or more. Neither includes the apex. Patterns are canonicalized before comparison.

Minimum items:
1
Maximum items:
100

Response

hosts: string[]

Canonicalized hostname patterns trusted to embed previews. Exact hosts match only themselves; *.example.com matches exactly one subdomain label; **.example.com matches one or more subdomain labels. Wildcards do not include the apex, so list example.com separately when it should also be trusted.