Settings

Append Trusted Preview Hosts

Changed on

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/settings/preview-hosts

Request

  • Base URL
    https://api.v0.dev/v2
  • URL
    https://api.v0.dev/v2/settings/preview-hosts
  • Auth
    HTTP bearer

Request body

hostsstring[] required

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.

Response

Response for status 200

hostsstring[] required

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.

Changes