Hanzo AI
OpenapiProjects

Create projects

Creates a project — the handle a site is deployed and served under — and answers 201 with it in `draft`.

POST /v1/projects

Addresshttps://api.hanzo.ai/v1/projects
MethodPOST
Operationpost_projects
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a project — the handle a site is deployed and served under — and answers 201 with it in draft.

name is required; slug is derived from the name when omitted and is the identifier that matters — it becomes the S3 key segment, the public host <slug>.hanzo.app, and the handle every later call addresses, so it must match ^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$ and may not be a reserved label such as api or admin. framework is a build hint from a closed set, defaulting to static; it never gates a deploy, it only tells CI how to build a linked repo.

Two defaults are worth knowing: the analytics beacon is ON unless analytics is explicitly false, and visibility is public unless asked otherwise. Publishing publicly is free; PRIVATE is the paid feature, and an unfunded org asking for it is refused rather than quietly published as public. Creation also provisions the project's data space and a canonical git repo, both best-effort — neither can fail the create.

Scope: a validated principal is required (403 without one) and the project is created in THAT principal's org. The slug is unique per org, so a slug already used in the caller's own org is a 409 while the same slug in another org is irrelevant.

Request

11 fields, body application/json (required).

FieldInTypeRequiredDescription
analyticsbodyboolean—Analytics is the opt-OUT for the wired-by-default analytics beacon: absent (nil) ⇒ ON (the default); explicit false ⇒ off.
descriptionbodystring—Description is the one-line summary, copied onto anything forked from this project.
frameworkbodystring—Framework is a BUILD HINT from a closed set, defaulting to static.
licensebodystring—License is the terms that upstream work carries.
namebodystring—Name is the project's display name and the only REQUIRED field.
repobodyobject—Repo links a git source, so pushes to it rebuild this project.
repo.branchbodystring—
repo.urlbodystring—
slugbodystring—Slug is the handle everything else addresses this project by: the public host &lt;slug&gt;.hanzo.app, the object-store key segment, and the path parameter of every…
upstreambodystring—Upstream credits the third-party work this project was published from.
visibilitybodystring—Visibility is "public" (the default when absent) or "private". Publishing publicly is ungated — that is the point of a community.

Response

StatusBodyMeaning
201projectsProjectcreated

201 body — 30 fields.

FieldInTypeAlwaysDescription
analyticsbodyboolean—Analytics is whether the web-analytics beacon is injected into this site's pages.
bucketbodystring—Bucket is the object-store bucket the site's files are served out of.
cacheControlbodystring—CacheControl is the Cache-Control policy the edge serves this site's HTML under — how long a reader may hold a stale page before asking again.
createdAtbodyinteger—CreatedAt is when the project was created, as Unix seconds.
currentDeploymentIdbodystring—CurrentDeploymentID names the deployment currently serving, so a caller can ask what is live without scanning the history.
descriptionbodystring—Description is the one-line summary, which is copied onto forks of this project and shown on a gallery card.
forkedFrombodystring—ForkedFrom is the parent this project was forked from ("<org>/<slug>" of a published project, or a catalog template slug) — the attribution edge a gallery…
frameworkbodystring—Framework is a BUILD HINT from a closed set, defaulting to static.
hiddenbodyboolean—Hidden is PLATFORM MODERATION, and it is a different axis from visibility: it pulls a public project out of the catalogue without editing the publisher's own…
hiddenReasonbodystring—HiddenReason is why moderation hid it.
idbodystring—ID is the project's internal identifier.
keybodystring—Key is the project's publishable ingest key, minted at create.
lastPurgeAtbodyinteger—LastPurgeAt is when the edge cache was last cleared, as Unix seconds, so a console can say how fresh what readers see actually is.
licensebodystring—License is the terms that upstream work carries.
liveUrlbodystring—LiveURL is where the site answers today.
namebodystring—Name is the project's display name, free text a person chose.
orgbodystring—Org is the organisation that owns the project, and therefore who pays for it and who may change it.
repobodyprojectsRepo—
repo.branchbodystring—Branch is the ref a push has to touch for this project to rebuild.
repo.providerbodystring—Provider is the forge the URL was recognised as — it decides which webhook and which credential reach the repository, and is DERIVED from the URL rather than…
repo.urlbodystring—URL is the clone address of the repository this project builds from.
slugbodystring—Slug is the identifier that MATTERS: the handle every later call addresses, the S3 key segment the site's objects live under, and the label of the public host…
spacebodystring—Space is the project's Base data space, which is where a deployed site's form, forum and data submissions land.
starredbodyboolean—Starred is THIS CALLER's star, not a property of the project — two people in the same org see different values for the same row, which is the whole point of…
statusbodystring—Status is where the project stands — whether a build has ever succeeded and whether anything is serving right now.
tagsbodyobject—Tags is the site's browser tag config: platform slug → non-secret pixel id (GA measurement, Meta pixel, …) — what track.js injects and the server CAPI reads,…
tags.*bodystring—
updatedAtbodyinteger—UpdatedAt is when the project's own record last changed, as Unix seconds.
upstreambodystring—Upstream credits the third-party work this project was published from — a free-text line, because the honest answer is a name and a title that no enum could…
visibilitybodystring—Visibility is "public" or "private", and Hidden reports platform moderation.

Failure carries the platform error shape — see Errors.

Examples

hanzo projects create

Projects API · All Hanzo APIs · Interactive reference

How is this guide?

On this page