> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hopae.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Custom Domain

> Remove the custom domain from an app.

Tears down the custom domain and reverts the app to the default Hopae URLs. Returns the resulting `CustomDomainStateDto` (now `unconfigured`). See [Custom Domain](/guides/concepts/custom-domain) for the concept and lifecycle.

<Warning>
  This can be done at any status, **including `active`**. Deleting an active domain takes it out of service immediately — verification pages and the OIDC backend fall back to the default Hopae URLs at once, which breaks any integration still pointing at the custom hosts. This action can't be undone.
</Warning>

## Request

<ParamField header="Authorization" type="string" required>
  `Bearer <API_KEY>` from Console > Developers > Workspace API Keys.
</ParamField>

### Path parameters

<ParamField path="client_id" type="string" required>
  Client identifier of the app.
</ParamField>

## Response

Returns the `CustomDomainStateDto` after teardown — `status` is `unconfigured` and the host fields are cleared. After deletion you can safely remove the DNS records you added.

<ResponseField name="webDomain" type="string">
  The configured Web Frontend host. Cleared (omitted) after deletion.
</ResponseField>

<ResponseField name="oidcDomain" type="string">
  The configured OIDC Backend host. Cleared (omitted) after deletion.
</ResponseField>

<ResponseField name="status" type="string">
  Lifecycle status. `unconfigured` after a successful delete.
</ResponseField>

<ResponseField name="requiredAction" type="string">
  What you need to do next. One of `none`, `add_cname`, `waiting`, `verify`, `contact_support`, `retry`. `none` after a successful delete.
</ResponseField>

<ResponseField name="statusMessage" type="string">
  Human-readable explanation of the current status. Omitted when there is nothing to report.
</ResponseField>

<ResponseField name="dnsRecords" type="object[]">
  DNS records to add at your DNS provider. Empty after deletion. See [Get Custom Domain](/api-reference/workspace/get-custom-domain) for each record's fields.
</ResponseField>

<ResponseField name="lastCheckedAt" type="string">
  ISO 8601 timestamp of the most recent verify. Omitted once unconfigured.
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X DELETE \
    -H "Authorization: Bearer sk_workspace_test_..." \
    "https://sandbox.api.hopae.com/connect/v1/apps/abc123/custom-domain"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "status": "unconfigured",
    "requiredAction": "none",
    "dnsRecords": []
  }
  ```
</ResponseExample>
