Creates a new brand kit, or edits one that is NOT the workspace's brand. Use it when someone asks you to put their brand together (from their site, a deck, or what they tell you) or to try a variation. You can't change the workspace's brand itself — make a draft and tell the user they can choose it in Napkin's Brand section. A kit is a document of sections, each with `title`, `kind` (overview, voice, colors, typography, logo, imagery, motion, layout, examples, custom), markdown `body`, and `rules` ({rule, why}); colors sections hold `swatches` ({name, value: 6-digit hex, note}), typography sections hold `faces` ({name: what it's for, family: a font name or sans / serif / mono / rounded / marker, note}), voice sections hold `use` and `avoid` ({term, instead, why}), and any section can hold `assets` ({fileId: an image already in the workspace's files, name, note, backdrop: hex}) — logo versions, example images — and `links` ({url, title, note}). An examples section holds work that gets the brand right: screenshots as assets and pages as links, each with a note on what makes it good. Exact numbers (timings, spacing) go in the section's prose. New kits start with empty standard sections plus the workspace's colors. `content.sections` upserts by title (or id): fields you pass replace, lists inside replace, sections you don't mention are kept; `removeSections` drops by title. `content.uses` says how Napkin uses the brand — color roles (ink, muted, background, surface, accent, accent2) and fonts (heading, body, mono) — by swatch or face NAME. Give every rule a `why`: the reason is what lets people decide cases the rule doesn't cover.
View input schema
{
"type": "object",
"properties": {
"kitId": {
"description": "Kit to edit. Omit to create a new kit.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": {
"type": "string",
"maxLength": 500
},
"fromKitId": {
"description": "New kits only: start from this kit's values.",
"type": "string",
"minLength": 1,
"maxLength": 64
},
"content": {
"type": "object",
"properties": {
"sections": {
"maxItems": 40,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"kind": {
"type": "string",
"enum": [
"overview",
"voice",
"colors",
"typography",
"logo",
"imagery",
"motion",
"layout",
"examples",
"custom"
]
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"body": {
"type": "string",
"maxLength": 20000
},
"rules": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"rule": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"why": {
"type": "string",
"maxLength": 1000
}
},
"required": [
"id",
"rule"
]
}
},
"swatches": {
"maxItems": 60,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"value": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
},
"note": {
"type": "string",
"maxLength": 500
}
},
"required": [
"id",
"name",
"value"
]
}
},
"faces": {
"maxItems": 20,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"family": {
"type": "string",
"minLength": 1,
"maxLength": 60
},
"note": {
"type": "string",
"maxLength": 500
},
"files": {
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"fileId": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"weight": {
"type": "integer",
"minimum": 100,
"maximum": 900
},
"italic": {
"type": "boolean"
}
},
"required": [
"fileId",
"weight"
]
}
}
},
"required": [
"id",
"name",
"family"
]
}
},
"use": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"term": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"instead": {
"type": "string",
"maxLength": 80
},
"why": {
"type": "string",
"maxLength": 500
}
},
"required": [
"term"
]
}
},
"avoid": {
"maxItems": 100,
"type": "array",
"items": {
"type": "object",
"properties": {
"term": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"instead": {
"type": "string",
"maxLength": 80
},
"why": {
"type": "string",
"maxLength": 500
}
},
"required": [
"term"
]
}
},
"assets": {
"maxItems": 60,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"fileId": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"note": {
"type": "string",
"maxLength": 500
},
"backdrop": {
"type": "string",
"pattern": "^#[0-9a-fA-F]{6}$"
}
},
"required": [
"id",
"fileId",
"name"
]
}
},
"links": {
"maxItems": 60,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"url": {
"type": "string",
"maxLength": 2000,
"format": "uri"
},
"title": {
"type": "string",
"maxLength": 120
},
"note": {
"type": "string",
"maxLength": 500
}
},
"required": [
"id",
"url"
]
}
},
"layouts": {
"maxItems": 40,
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"note": {
"type": "string",
"maxLength": 500
},
"html": {
"type": "string",
"minLength": 1,
"maxLength": 20000
},
"css": {
"type": "string",
"maxLength": 20000
}
},
"required": [
"id",
"name",
"html"
]
}
}
},
"required": [
"title"
]
}
},
"removeSections": {
"maxItems": 40,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
},
"uses": {
"type": "object",
"properties": {
"colors": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"ink",
"muted",
"background",
"surface",
"accent",
"accent2"
]
},
"additionalProperties": {
"type": "string",
"maxLength": 60
},
"required": [
"ink",
"muted",
"background",
"surface",
"accent",
"accent2"
]
},
"palette": {
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"maxLength": 60
}
},
"fonts": {
"type": "object",
"propertyNames": {
"type": "string",
"enum": [
"heading",
"body",
"mono"
]
},
"additionalProperties": {
"type": "string",
"maxLength": 60
},
"required": [
"heading",
"body",
"mono"
]
},
"radius": {
"type": "number",
"minimum": 0,
"maximum": 48
}
}
}
}
},
"workspace": {
"description": "Workspace slug. Personal tokens with no default workspace MUST pass this; tokens with a default can override per call. Ignored for workspace API keys.",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}