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

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

`PATCH /api/v1/hosting/apps/{app_id}/preview_profiles/{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}/preview_profiles/{id}`
- Auth: HTTP bearer

## Path parameters

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

## Request body

- object
  - `name` string
  - `slug` string
  - `source_environment_id` string
  - `ttl_days` integer
  - `automatic` boolean
  - `configuration` PreviewDefaultsConfiguration
    - `variables` object
    - `build_variables` object
    - `required_keys` string[]
    - `service_resources` 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`

Updated preview defaults

- object
  - `profile` PreviewProfileRecord, required
    - `id` string, required
    - `hosted_app_id` string, required
    - `source_environment_id` string, required
    - `name` string, required
    - `slug` string, required
    - `automatic` boolean, required
    - `ttl_days` integer, required
    - `created_at` string
    - `updated_at` string
    - `configuration` PreviewDefaultsConfiguration, required
      - `variables` object
      - `build_variables` object
      - `required_keys` string[]
      - `service_resources` PreviewResourceOverrides: Service public IDs mapped to resource overrides. Omitted fields inherit; an empty map removes all local overrides. Null reservations select platform defaults.

## 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/74298a24e040?raw)
