---
title: "Append Trusted Preview Hosts"
method: PATCH
path: "/settings/preview-hosts"
tags: ["Settings"]
---

# Append Trusted Preview Hosts

`PATCH /settings/preview-hosts`

## Request

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

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.

## Request body

- object
  - `hosts` string[], 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 `200`

Response for status 200

- TrustedPreviewHosts
  - `hosts` string[], 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.

## Other responses

- `401`: Response for status 401
- `403`: Response for status 403
- `404`: Response for status 404
- `422`: Response for status 422
- `500`: Response for status 500

## Changes

- **2026-09-17** `522223b11589`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/v0-platform-api-beta/changes/settings/preview-hosts/patch.md)

---

[API](https://skmtc.dev/vercel/apis/v0-platform-api-beta.md) - [All operations](https://skmtc.dev/vercel/apis/v0-platform-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/v0-platform-api-beta/revisions/467d24b4c224?raw)
