Gives a custom hostname back, so the name is free to reuse.
Gives a custom hostname back, so the name is free to reuse.
DELETE /v1/projects/{slug}/domains/{host}
| Address | https://api.hanzo.ai/v1/projects/{slug}/domains/{host} |
| Method | DELETE |
| Operation | delete_projects_by_slug_domains_by_host |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Gives a custom hostname back, so the name is free to reuse.
A claim is FIRST-COME and global, so an add-only surface was not ownership but a leak: a customer who mistyped a domain, or claimed one they later moved elsewhere, could neither reuse it nor let anyone else. This is the third writer that closes it. The release is scoped to (host, org, slug), so it can only ever drop THIS tenant's own claim, and it is IDEMPOTENT: releasing a host we do not hold is a clean 204, never a 404 that would let a caller probe which hosts other tenants hold. The edge cache-tag is flushed, since the host stops routing here.
Scope: a validated principal is required (403 without one) and the site is resolved within that principal's org, so another tenant's slug is a 404.
Request
2 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the project the host is attached to, from the path. |
host | path | string | yes | Host is the custom hostname, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
204 | — | no content |
Failure carries the platform error shape — see Errors.
Examples
hanzo projects domains rm <slug> <host>import { Configuration, ProjectsApi } from 'hanzoai';
const api = new ProjectsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteProjectsBySlugDomainsByHost({ slug: 'slug', host: 'host' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProjectsApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProjectsApi(client).delete_projects_by_slug_domains_by_host(slug='slug', host='host')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.ProjectsAPI.DeleteProjectsBySlugDomainsByHost(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, projects_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = projects_api::delete_projects_by_slug_domains_by_host(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProjectsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new ProjectsApi(client).deleteProjectsBySlugDomainsByHost();curl -X DELETE https://api.hanzo.ai/v1/projects/<slug>/domains/<host> \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches projects through the projects tool, which names its 48 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_projects"
}
}
}'How is this guide?