---
title: "PATCH /api/v1/hosting/apps/{app_id}/previews/{id}"
method: PATCH
path: "/api/v1/hosting/apps/{app_id}/previews/{id}"
tags: ["hosting"]
---

# PATCH /api/v1/hosting/apps/{app_id}/previews/{id}

`PATCH /api/v1/hosting/apps/{app_id}/previews/{id}`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/hosting/apps/{app_id}/previews/{id}`
- Auth: HTTP bearer

## Path parameters

- `app_id` string, required
- `id` string, required

## Request body

- object
  - `access` 'org_members' | 'public'
  - `retained` boolean
  - `expires_at` string
  - `expected_generation` integer: Required for resource_overrides, storage_binding_resources, shared_service_binding_ids or shared_data_binding_ids; stale generations return 409.
  - `storage_binding_resources` object: Replace preview storage selections, mapping captured mount binding IDs to storage resource IDs. Empty removes mounts. Requires a paused preview and completed cleanup. Shared source local caches and compatible pre-provisioned preview-owned volumes are supported; production single-writer volumes cannot be shared. Source refresh resets selections.
  - `shared_data_binding_ids` string[]: Replace explicitly shared captured native data connections. Empty removes sharing. Requires paused preview and completed cleanup; runtime credentials come only from active managed connection secrets and require workload grants.
  - `shared_service_binding_ids` string[]: Replace the explicitly shared captured service dependencies. Empty removes sharing. Requires paused preview and completed cleanup. Source refresh resets this selection.
  - `resource_overrides` PreviewResourceOverrides: Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.

## Response `200`

Success

- object

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `422`: Unprocessable entity
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/19698ba051dc?raw)
