List sites — GET /v1/project/sites

Returns the org's deployed sites at the pretty URLs they serve at.

GET /v1/project/sites

Addresshttps://api.hanzo.ai/v1/project/sites
MethodGET
Operationget_project_sites
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the org's deployed sites at the pretty URLs they serve at.

It reads the SAME org-scoped store as /v1/project and keeps only the projects that are actually live, so a draft or a failed build is not advertised as a site.

Scope: a validated principal is required (401 without one) and the list is keyed by that principal's org.

Request

GET /v1/project/sites takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200project.projectsSite[]ok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
[].namebodystring—Name is the site's display name.
[].slugbodystring—Slug is the site's handle — also the label of the host it serves at.
[].statusbodystring—Status is the project's state behind the site — whether it is serving, still building, or failed its last build.
[].updatedAtbodyinteger (int64)—UpdatedAt is when the project last changed, as Unix seconds.
[].urlbodystring—URL is the pretty address readers use, not the object-store path behind it.

Failure carries the platform error shape — see Errors.

Examples

hanzo project sites list
import { Configuration, ProjectApi } from 'hanzoai';

const api = new ProjectApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getProjectSites();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ProjectApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ProjectApi(client).get_project_sites()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

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

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

let result = project_api::get_project_sites(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ProjectApi;

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

var result = new ProjectApi(client).getProjectSites();
curl https://api.hanzo.ai/v1/project/sites \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool project, op get_project_sites — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "project",
         "arguments": {
           "op": "get_project_sites",
           "input": {}
         }
       }
     }'

Project API · All Hanzo APIs · Interactive reference

Was this page useful?