---
title: "Change a running deployment's domain"
method: POST
path: "/platform/deployments/{id}/domain"
tags: ["Platform"]
---

# Change a running deployment's domain

`POST /platform/deployments/{id}/domain`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/deployments/{id}/domain`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Re-routes a running deployment to a new hostname. The agent
regenerates its Caddy fragment + reloads with zero downtime;
the container and any Tor sidecar are untouched.

Requires an agent that supports domain handover
(`domain-handover-v1`: agent 0.6.22 or later).
Other agents get `409 CONFLICT` before anything changes, and the
current domain keeps serving.

DNS for the new hostname is the customer's responsibility —
point an A record at the agent's public IP (or a CNAME at the
old subdomain) before calling this.

## Path parameters

- `id` string, required

## Request body

- object
  - `domain` string, required: New FQDN (no scheme).

## Response `202`

Domain change enqueued

## Other responses

- `400`: Validation failed on the request body or query parameters
- `401`: Invalid or missing API credentials
- `404`: Resource not found
- `409`: Request would violate a unique constraint or state precondition

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
