CreateAssetReq
Request body for creating an asset. Carries the asset's identity (metadata) and content (spec).
- metadataType: objectrequired
The resource's identity and human-facing labels. Shared shape across all five resource kinds (blueprints, templates, schemas, assets, functions). The pair
(key, version)is the canonical handle for any resource within a namespace.- keyType: string
Pattern: ^[a-z][a-z0-9]*(_[a-z0-9]+)*$requiredCaller-supplied identifier, unique within the namespace per kind. Stable across versions — a blueprint's
keydoesn't change when you publish a new version. Snake_case; must start with a lowercase letter. - nameType: stringmax length:200required
Human-readable display name shown in Studio, list responses, and audit trails (max 200 chars).
- versionType: stringrequired
Either
draft(editable; only one draft per key at a time) or a semver like1.2.0(immutable once published). On create you choose: passdraftto iterate, or a semver to publish directly. - descriptionType: stringmax length:1000
Optional longer-form description. Helps both humans and AI assistants pick the right resource when browsing the catalog (max 1000 chars).
- labelsType: object
Arbitrary key/value tags for categorization and filtering — e.g.
{ "team": "people-ops", "env": "prod" }. Filterable on list endpoints via?labels[key]=value.
- specType: objectrequired
The asset's content.
typeis required and determines the asset kind (PDF, HTML, image, CSS), which in turn determines whether the binary content is referenced viafileIdor supplied inline ascontent.- Binary types (
pdf,image) — upload the file first viaPOST .../files/upload-urland pass the returned ID infileId. - Text types (
html,css) — supply the content inline as a string incontent.
HTML assets additionally use
htmlConfigto declare partials, styles, images, the viewModel schema, and PDF rendering options. HTML assets are wrapped by HTML templates and rendered via Handlebars.- typeType: stringenumrequired
Asset kind — determines whether the binary lives at
fileId(binary) or inline atcontent(text).values- html
- image
- pdf
- css
- contentType: string
Inline text content. Required for
htmlandcssasset types. Pass the raw HTML source or CSS rules as a string. - fileType: string
Id Pattern: ^f_[0-9a-z]{26}$Reference to an uploaded binary file. Required for
pdfandimageasset types. Upload viaPOST .../files/upload-urlto obtain this ID. Prefixed lowercase ULID, e.g.f_01jv8m7qfj6xj9gkz7a4s2h8e. - htmlType: object
Config HTML-only. Declares assets the HTML template references (partials, styles, images), the viewModel schema, and PDF rendering options. Combined with the inline
content(a Handlebars template), this configures how the HTML renders to PDF.
- Binary types (
- apiType: string
Version Optional API version of the resource shape. Defaults to the current spec version.
