Operazioni sul brand
13 operazioni di nome brand.*. Ognuna si esegue in un batch con apply_ops, dry_run_ops, la CLI o l’admin.
| Operation | What it does | Permission | Confirmation |
|---|---|---|---|
| brand.setup | Set the site's brand from three colours, a type pairing, a type ratio and base size, a spacing unit and a corner style: the server derives every token write of the brand (the brand, accent and neutral palette ramps, the light and dark colour roles as aliases of palette steps, the font sizes and families, the main type presets, the space steps and the radii) and lands them as one designSystem.setTokens change, gated once for AA contrast on the end state, so one undo restores the lot. | designSystem.operation | none |
| brand.presets | List the site's brand presets, the brand identities its brand templates draw from, each with its id, name and last change. | site.admin | none |
| brand.templates | List the site's brand templates, the fixed-size canvases (a social post, a banner) brand.render draws: each with its name, size, status (draft or approved), version and canvas page. | site.admin | none |
| brand.updateIdentity | Patch a brand identity (the default preset's, or presetId's): its brand name, tagline, logos, the four brand colours, the headline and body roles, the tone words and the do and don't rules. | site.admin | none |
| brand.createPreset | Add a brand preset named presetName: a copy of preset cloneFrom, or without it the theme's default identity for the site. | site.admin | none |
| brand.renamePreset | Rename a brand preset. | site.admin | none |
| brand.deletePreset | Delete a brand preset; the site's last one is refused (409 brand_last_preset). | site.admin | destructive |
| brand.createTemplate | Create a brand template: a canvas page of width by height pixels (fixed at creation) with a first section, laid out from one of the theme's canvas presets when layoutId names one. | site.admin | none |
| brand.updateTemplate | Rename a brand template, approve it (status: "approved" with expectedDraftRevision, the canvas revision you approve: that canvas becomes the version brand.render draws) or set which of its fields a person may change when generating (customerSettings). | site.admin | none |
| brand.deleteTemplate | Delete a brand template, then its canvas page. | site.admin | destructive |
| brand.rebuildTemplate | Recreate the canvas page of a brand template whose page was deleted, from its last approved snapshot (refused when it has none); edits made after that approval do not come back. | site.admin | none |
| brand.render | Render an approved brand template to a PNG (scale 1 or 2) in a brand preset (presetId), with the overrides of the fields its curation lets a person change (overrides, by node), and answer it as base64 without storing it. | brand.generate | none |
| brand.save | Render an approved brand template as brand.render does and store the PNG in the media library, with the record of how it was made. | brand.generate | none |
brand.setup
Set the site's brand from three colours, a type pairing, a type ratio and base size, a spacing unit and a corner style: the server derives every token write of the brand (the brand, accent and neutral palette ramps, the light and dark colour roles as aliases of palette steps, the font sizes and families, the main type presets, the space steps and the radii) and lands them as one designSystem.setTokens change, gated once for AA contrast on the end state, so one undo restores the lot. A brand with pairs below AA is refused unless the input carries acknowledgeContrast: true, the designer's explicit "save anyway", which the stored batch keeps; then the failing pairs come back as error findings. The admin's Brand setup screen runs this same operation.
Esempio di input
{
"primary": "#1e3d4f",
"secondary": "#c8553d",
"neutral": "#737373",
"headingFamily": [
"DM Sans",
"sans-serif"
],
"bodyFamily": [
"DM Sans",
"sans-serif"
],
"typeRatio": 1.25,
"baseSize": 17,
"spaceBase": 4,
"radius": "soft"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| primary | string | yes | |
| secondary | string | yes | |
| neutral | string | yes | |
| headingFamily | array of string | yes | At least 1 item. |
| bodyFamily | array of string | yes | At least 1 item. |
| typeRatio | number | yes | One of 1.125, 1.2, 1.25, 1.333. |
| baseSize | integer | yes | At least 14. At most 22. |
| spaceBase | number | yes | One of 4, 8. |
| radius | string | yes | One of "sharp", "soft", "round", "pill". |
| acknowledgeContrast | true | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| tree | object | no | |
| tree.pageId | string | yes | |
| tree.revision | integer | yes | |
| tree.inverse | array of object | object | object | object | object | object | object | object | object | object | object | object | object | yes | |
| findings | array of object | object | object | object | object | yes | |
| diff | array of object | object | object | object | object | object | yes | |
| changes | array of object | no | |
| changes[].change | string | yes | One of "added", "changed", "removed". |
| changes[].override | object | object | object | object | object | object | yes | |
| changed | boolean | yes | |
| revision | integer | yes | |
| dryRun | boolean | yes | |
| css | string | null | yes | |
| report | object | no | |
| report.adds | array of object | yes | |
| report.changes | array of object | yes | |
| report.typeConflicts | array of object | yes | |
| report.unknownNames | array of object | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Provala
yarn splash brand.setup '{"primary":"#1e3d4f","secondary":"#c8553d","neutral":"#737373","headingFamily":["DM Sans","sans-serif"],"bodyFamily":["DM Sans","sans-serif"],"typeRatio":1.25,"baseSize":17,"spaceBase":4,"radius":"soft"}' --dry-runbrand.presets
List the site's brand presets, the brand identities its brand templates draw from, each with its id, name and last change. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| presets | array of object | yes | |
| presets[].presetId | string | yes | |
| presets[].presetName | string | yes | |
| presets[].updatedAt | string | yes |
Provala
yarn splash brand.presets '{}' --dry-runbrand.templates
List the site's brand templates, the fixed-size canvases (a social post, a banner) brand.render draws: each with its name, size, status (draft or approved), version and canvas page. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{}Input
L’input è un record: vedi lo schema qui sotto.
{
"type": "object",
"properties": {},
"additionalProperties": false
}Output
| Field | Type | Required | Notes |
|---|---|---|---|
| templates | array of object | yes | |
| templates[].id | string | yes | At least 1 character. |
| templates[].name | string | yes | |
| templates[].pageId | string | yes | At least 1 character. |
| templates[].snapshot | object | null | yes | Default null. |
| templates[].customerSettings | record of array of string | null | yes | Default null. |
| templates[].status | string | yes | One of "draft", "approved". |
| templates[].version | number | yes | |
| templates[].width | number | yes | |
| templates[].height | number | yes | |
| templates[].createdAt | string | yes | |
| templates[].updatedAt | string | yes |
Provala
yarn splash brand.templates '{}' --dry-runbrand.updateIdentity
Patch a brand identity (the default preset's, or presetId's): its brand name, tagline, logos, the four brand colours, the headline and body roles, the tone words and the do and don't rules. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"identity": {
"brandName": "Studio",
"tagline": "Architecture and landscape"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| presetId | string | no | At least 1 character. |
| identity | object | yes | |
| identity.brandName | string | no | |
| identity.tagline | string | no | |
| identity.logoPrimary | string | null | no | |
| identity.logoInverse | string | null | no | |
| identity.logoMark | string | null | no | |
| identity.brandPrimary | string | no | |
| identity.brandSecondary | string | no | |
| identity.brandSurface | string | no | |
| identity.brandOnSurface | string | no | |
| identity.headlineRole | string | no | |
| identity.bodyRole | string | no | |
| identity.toneWords | string | no | |
| identity.doRules | string | no | |
| identity.dontRules | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| identity | object | yes | |
| identity.brandName | string | yes | |
| identity.tagline | string | yes | |
| identity.logoPrimary | string | null | yes | |
| identity.logoInverse | string | null | yes | |
| identity.logoMark | string | null | yes | |
| identity.brandPrimary | string | yes | |
| identity.brandSecondary | string | yes | |
| identity.brandSurface | string | yes | |
| identity.brandOnSurface | string | yes | |
| identity.headlineRole | string | yes | |
| identity.bodyRole | string | yes | |
| identity.toneWords | string | yes | |
| identity.doRules | string | yes | |
| identity.dontRules | string | yes |
Provala
yarn splash brand.updateIdentity '{"identity":{"brandName":"Studio","tagline":"Architecture and landscape"}}' --dry-runbrand.createPreset
Add a brand preset named presetName: a copy of preset cloneFrom, or without it the theme's default identity for the site. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"presetName": "Autumn campaign"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| presetName | string | yes | At least 1 character. At most 120 characters. |
| cloneFrom | string | no | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| presetId | string | yes | |
| presetName | string | yes | |
| updatedAt | string | yes |
Provala
yarn splash brand.createPreset '{"presetName":"Autumn campaign"}' --dry-runbrand.renamePreset
Rename a brand preset. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"presetId": "autumn-campaign",
"presetName": "Autumn campaign 2026"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| presetId | string | yes | At least 1 character. |
| presetName | string | yes | At least 1 character. At most 120 characters. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| presetId | string | yes | |
| presetName | string | yes | |
| updatedAt | string | yes |
Provala
yarn splash brand.renamePreset '{"presetId":"autumn-campaign","presetName":"Autumn campaign 2026"}' --dry-runbrand.deletePreset
Delete a brand preset; the site's last one is refused (409 brand_last_preset). Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"presetId": "autumn-campaign"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| presetId | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| status | "deleted" | yes |
Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui yarn splash apply <file> --dry-run.
brand.createTemplate
Create a brand template: a canvas page of width by height pixels (fixed at creation) with a first section, laid out from one of the theme's canvas presets when layoutId names one. Edit its content with tree.commit on its page, then approve it with brand.updateTemplate. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"name": "Instagram post",
"width": 1080,
"height": 1080
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| name | string | yes | At least 1 character. At most 120 characters. |
| width | integer | yes | At least 16. At most 4096. |
| height | integer | yes | At least 16. At most 4096. |
| layoutId | string | no | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | At least 1 character. |
| name | string | yes | |
| pageId | string | yes | At least 1 character. |
| snapshot | object | null | yes | Default null. |
| customerSettings | record of array of string | null | yes | Default null. |
| status | string | yes | One of "draft", "approved". |
| version | number | yes | |
| width | number | yes | |
| height | number | yes | |
| createdAt | string | yes | |
| updatedAt | string | yes |
Provala
yarn splash brand.createTemplate '{"name":"Instagram post","width":1080,"height":1080}' --dry-runbrand.updateTemplate
Rename a brand template, approve it (status: "approved" with expectedDraftRevision, the canvas revision you approve: that canvas becomes the version brand.render draws) or set which of its fields a person may change when generating (customerSettings). Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"templateId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
"patch": {
"name": "Instagram post, square"
}
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| templateId | string | yes | At least 1 character. |
| patch | object | yes | |
| patch.name | string | no | At most 120 characters. |
| patch.status | string | no | One of "draft", "approved". |
| patch.customerSettings | record of array of string | null | no | |
| patch.expectedDraftRevision | string | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | At least 1 character. |
| name | string | yes | |
| pageId | string | yes | At least 1 character. |
| snapshot | object | null | yes | Default null. |
| customerSettings | record of array of string | null | yes | Default null. |
| status | string | yes | One of "draft", "approved". |
| version | number | yes | |
| width | number | yes | |
| height | number | yes | |
| createdAt | string | yes | |
| updatedAt | string | yes |
Provala
yarn splash brand.updateTemplate '{"templateId":"4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b","patch":{"name":"Instagram post, square"}}' --dry-runbrand.deleteTemplate
Delete a brand template, then its canvas page. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"templateId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| templateId | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| success | true | yes |
Vuole confirmed: ["destructive"] sul batch, che la forma della CLI per una sola operazione non imposta: mettila in un file di batch ed esegui yarn splash apply <file> --dry-run.
brand.rebuildTemplate
Recreate the canvas page of a brand template whose page was deleted, from its last approved snapshot (refused when it has none); edits made after that approval do not come back. Brand validation applies, and history.undo restores the brand rows the batch changed.
Esempio di input
{
"templateId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b"
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| templateId | string | yes | At least 1 character. |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| id | string | yes | At least 1 character. |
| name | string | yes | |
| pageId | string | yes | At least 1 character. |
| snapshot | object | null | yes | Default null. |
| customerSettings | record of array of string | null | yes | Default null. |
| status | string | yes | One of "draft", "approved". |
| version | number | yes | |
| width | number | yes | |
| height | number | yes | |
| createdAt | string | yes | |
| updatedAt | string | yes |
Provala
yarn splash brand.rebuildTemplate '{"templateId":"4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b"}' --dry-runbrand.render
Render an approved brand template to a PNG (scale 1 or 2) in a brand preset (presetId), with the overrides of the fields its curation lets a person change (overrides, by node), and answer it as base64 without storing it. The render runs in a standalone boundary; run it alone in a batch.
Esempio di input
{
"templateId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
"scale": 1
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| templateId | string | yes | At least 1 character. |
| presetId | string | no | At least 1 character. |
| scale | 1 | 2 | no | Default 1. |
| overrides | value | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| png | string | yes | |
| contentType | "image/png" | yes | |
| filename | string | yes | |
| templateVersion | integer | yes | More than 0. |
| width | integer | yes | More than 0. |
| height | integer | yes | More than 0. |
| warnings | array of string | yes |
Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.
brand.save
Render an approved brand template as brand.render does and store the PNG in the media library, with the record of how it was made. The render runs in a standalone boundary; run it alone in a batch.
Esempio di input
{
"templateId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
"scale": 2
}Input
| Field | Type | Required | Notes |
|---|---|---|---|
| templateId | string | yes | At least 1 character. |
| presetId | string | no | At least 1 character. |
| scale | 1 | 2 | no | Default 1. |
| overrides | value | no |
Output
| Field | Type | Required | Notes |
|---|---|---|---|
| kind | "template" | yes | |
| media | object | yes | |
| media.id | string (uuid) | yes | |
| media.kind | string | yes | One of "image", "svg", "video", "document". |
| media.filename | string | yes | At least 1 character. At most 255 characters. |
| media.mime | string | yes | At least 1 character. At most 127 characters. |
| media.size | integer | yes | At least 0. |
| media.url | string | yes | At least 1 character. At most 2048 characters. |
| media.width | integer | no | At least 1. At most 100000. |
| media.height | integer | no | At least 1. At most 100000. |
| media.variants | array of object | yes | |
| media.alt | string | record of string | yes | |
| media.caption | string | record of string | no | |
| media.credit | string | no | At most 200 characters. |
| media.folderId | string (uuid) | null | no | |
| media.pageCount | integer | no | At least 1. |
| templateId | string | yes | |
| templateVersion | integer | yes | More than 0. |
| width | integer | yes | More than 0. |
| height | integer | yes | More than 0. |
| warnings | array of string | yes |
I campi più annidati sono nello schema di output che risponde discover_operations con outputSchemas: true.
Un dry run rifiuta un’operazione esterna, quindi non ha una riga di prova: eseguila da sola in un batch.
Generato dal registro delle operazioni e dal catalogo degli strumenti MCP (sorgente 31b79796ca558f73).
Qualcosa non va in questa pagina? Scrivi a docs@librettocms.com.