Templates
Package templates is a gallery of starter kits you can deploy as they come.
Package templates is a gallery of starter kits you can deploy as they come.
| Base URL | https://api.hanzo.ai |
| Operations | 5 |
| Auth | Authorization: Bearer $HANZO_API_KEY |
templates
GET /v1/templates/{slug}
Returns one starter kit: the caller org's own by that slug, else the public catalog's. A slug another org owns reads as not found.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the starter kit to act on, from the path. |
PUT /v1/templates/{slug}
Overwrites the caller org's OWN starter kit at the path slug, answering the stored kit. A slug they do not own is 404, never a create: the UPDATE binds org, so a PUT can never reach another org's kit.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the kit to replace, from the path. |
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
category | string | — | Category groups the kit in the gallery browser. |
demo | string | — | Demo is the deployed site itself, when there is one. |
description | string | — | Description is the browse-card blurb, max 4096 characters. |
features | string[] | — | Features are the highlights the card lists, at most 32. |
framework | string | — | Framework is the stack the kit is built on ("Next.js 14"). |
preview | string | — | Preview is the still image the browse card renders, max 4096 characters. |
slug | string | — | Slug is the kit to replace, from the path. |
source | string | — | Source is the repository the kit is forked from, max 4096 characters. |
title | string | — | Title is the display name. |
useCase | string | — | UseCase is what the kit is for, in a phrase. |
variants | Variant[] | — | Variants are the shapes this kit ships in, at most 32; the fork picks one. |
DELETE /v1/templates/{slug}
Deletes the caller org's OWN starter kit. A slug they do not own is a 404, never a delete: the DELETE binds org.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
slug | path | string | yes | Slug is the starter kit to act on, from the path. |
GET /v1/templates
Lists the public starter-kit catalog plus, for a validated caller, that org's own private kits. No request field can widen the scope: the org comes from the validated principal, so an anonymous or cross-org caller structurally sees the public catalog only.
POST /v1/templates
Creates a starter kit PRIVATE to the caller's org and answers 201 with the stored kit. The owner is stamped by the server, so a body "org" is never trusted; publishing over a public-catalog slug is 409, so a slug still names exactly one kit.
Request body — application/json (required)
| Field | Type | Required | Description |
|---|---|---|---|
category | string | — | Category groups the kit in the gallery browser. |
demo | string | — | Demo is the deployed site itself, when there is one. |
description | string | — | Description is the browse-card blurb, max 4096 characters. |
features | string[] | — | Features are the highlights the card lists, at most 32. |
framework | string | — | Framework is the stack the kit is built on ("Next.js 14"). |
preview | string | — | Preview is the still image the browse card renders, max 4096 characters. |
slug | string | — | Slug is the kit's identity — lowercase alphanumeric with dashes, max 40. |
source | string | — | Source is the repository the kit is forked from, max 4096 characters. |
title | string | — | Title is the display name. |
useCase | string | — | UseCase is what the kit is for, in a phrase. |
variants | Variant[] | — | Variants are the shapes this kit ships in, at most 32; the fork picks one. |
How is this guide?