---
title: "Update Hosting Config"
method: PUT
path: "/api/domains/{domain_id}/hosting/"
tags: ["hosting"]
---

# Update Hosting Config

`PUT /api/domains/{domain_id}/hosting/`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/api/domains/{domain_id}/hosting/`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

## Path parameters

- `domain_id` string, required

## Headers

- `x-view-as` string, nullable

## Request body

- HostingConfigUpdate
  - `hosted_csp` HostedCSPSettings
    - `mode` 'report-only' | 'enforce'
    - `allow_https_resources` boolean
    - `sources` object
  - `base_domain` string, nullable
  - `ai_subdomain` string, nullable
  - `ai_path_prefix` string, nullable
  - `hosting_provider` string, nullable
  - `hosting_status` string, nullable
  - `alias_redirect_hosts` string[], nullable

## Response `200`

Successful Response

- HostingConfigResponse
  - `hosted_csp` HostedCSPSettings
    - `mode` 'report-only' | 'enforce'
    - `allow_https_resources` boolean
    - `sources` object
  - `id` string, required
  - `domain_id` string, required
  - `hosting_provider` string, required
  - `hosting_status` string, required
  - `base_domain` string, required
  - `ai_subdomain` string, required
  - `ai_path_prefix` string, required
  - `cloudfront_distribution_id` string, nullable, required
  - `cloudfront_domain_name` string, nullable, required
  - `s3_bucket_name` string, nullable, required
  - `s3_prefix` string, nullable, required
  - `cloudflare_zone_id` string, nullable, required
  - `cloudflare_custom_hostname_id` string, nullable, required
  - `cloudflare_custom_hostname_status` string, nullable, required
  - `ssl_status` string, required
  - `cname_target` string, nullable
  - `dns_records` object[], nullable
  - `subdomain_url` string, nullable
  - `preview_only` boolean
  - `public_url` string, nullable
  - `alias_redirect_hosts` string[]
  - `free_host` boolean
  - `pending_custom_host` string, nullable
  - `created_at` string, required
  - `updated_at` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
