POST
https://api.craftkit.dev/v1/embed/catalogsname creates the next version and marks it
current; the previous version is archived, never deleted. Sessions reference a catalog by name via
catalogRef.
Authorization
Bearer ck_live_… — a project API key for a project with embed enabled.Body
Catalog name. Lowercase letters, numbers, and hyphens (
^[a-z0-9][a-z0-9-]*$, ≤120 chars).
Reusing an existing name publishes the next version.The full catalog payload.
namespaces[].fields and loops[].itemFields) is:
Dot-path key (
customer.name). Pattern ^[a-zA-Z_][a-zA-Z0-9_.]*$, ≤160 chars.Display name in the picker (1–160 chars).
One of
text, longtext, number, currency, date, datetime, boolean, image, url, email.Client-side hint; form-fill blocks submit if left blank. Server-side enforcement still uses the template’s variable definition.
Formatting hint (
currency:EUR, date:DD/MM/YYYY), ≤60 chars.Helper text shown under the field, ≤280 chars.
Dummy value for the live preview / input placeholder.
Response
201 when the version is published.
Catalog row UUID for the new version.
The catalog name you passed.
Monotonically increasing version number within this name.
Errors
| Status | code | Meaning |
|---|---|---|
| 401 | missing_authorization | No Authorization: Bearer header. |
| 401 | invalid_credentials | Key not found, revoked, or embed not enabled. |
| 400 | invalid_json | Body is not valid JSON. |
| 422 | invalid_request | name/envelope or catalog failed validation (issues included). |
| 500 | internal_error | Auth check or catalog persistence threw — retry. |
cURL
201