Verify domains

Checks a custom domain's DNS and turns it on if it passes.

POST /v1/platform/projects/{project}/apps/{app}/domains/{host}/verify

Addresshttps://api.hanzo.ai/v1/platform/projects/{project}/apps/{app}/domains/{host}/verify
MethodPOST
Operationpost_platform_projects_by_project_apps_by_app_domains_by_host_verify
AuthAuthorization: Bearer $HANZO_API_KEY

Checks a custom domain's DNS and turns it on if it passes.

It runs the DNS challenge check for a pending custom host and, when it passes, marks the host verified and renders it into the app's ingress so it starts serving.

A check that RAN and did not pass is not an error: it answers 200 with the host still pending and the reason in detail, so a console can show the operator what DNS is actually returning. An already-verified host answers as-is without re-checking. A host not claimed by this app is 404. Requires a validated principal; 401 without one.

Request

3 fields.

FieldInTypeRequiredDescription
projectpathstringyesProject is the project the application lives under, from the path.
apppathstringyesApp is the application's slug, from the path.
hostpathstringyesHost is the hostname, from the path.

Response

StatusBodyMeaning
200platform.domainViewok
defaultproblem-detailsrefused

200 body — 12 fields.

FieldInTypeAlwaysDescription
createdAtbodyinteger (int64)—CreatedAt is the unix second the custom claim was made.
detailbodystring—Detail says why a claim is still pending, in the resolver's own words.
hostbodystring—Host is the hostname itself.
kindbodystring—Kind is default, subtree or custom — how the org came to own it.
primarybodyboolean—Primary marks the app's permanent default host.
recordsbodyplatform.Record[]—Records are the DNS records to publish while a custom claim is pending.
records[].namebodystring—the record name the customer creates
records[].typebodystring—TXT | CNAME
records[].valuebodystring—the record value
statusbodystring—Status is live, provisioning, pending_deploy or pending, derived from the operator CR and never fabricated.
urlbodystring—URL is the host as an HTTPS address.
verifiedbodyboolean—Verified is whether ownership is settled — always true for a host the org structurally owns.

Failure carries the platform error shape — see Errors.

Examples

hanzo platform projects apps domains verify <project> <app> <host>
import { Configuration, PlatformApi } from 'hanzoai';

const api = new PlatformApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postPlatformProjectsByProjectAppsByAppDomainsByHostVerify({ project: 'project', app: 'app', host: 'host' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PlatformApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PlatformApi(client).post_platform_projects_by_project_apps_by_app_domains_by_host_verify(project='project', app='app', host='host')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.PlatformAPI.PostPlatformProjectsByProjectAppsByAppDomainsByHostVerify(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, platform_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = platform_api::post_platform_projects_by_project_apps_by_app_domains_by_host_verify(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PlatformApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new PlatformApi(client).postPlatformProjectsByProjectAppsByAppDomainsByHostVerify();
curl -X POST https://api.hanzo.ai/v1/platform/projects/<project>/apps/<app>/domains/<host>/verify \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches platform through the platform tool, which names its 38 operations with its own verbs — this one among them, under a name only MCP 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": "get_build"
         }
       }
     }'

Platform API · All Hanzo APIs · Interactive reference

Was this page useful?