Create a brand kit
Saves a brand kit. The palette is contrast-checked server-side against WCAG AA for its text pairs and a failing palette is refused with a 422 that names the offending pair — the check cannot be skipped by calling the API directly. Font families must come from the committed allowlist; a family outside it is a 400.
Saves a brand kit. The palette is contrast-checked server-side against WCAG AA for its text pairs and a failing palette is refused with a 422 that names the offending pair — the check cannot be skipped by calling the API directly. Font families must come from the committed allowlist; a family outside it is a 400.
Request Body
application/json
The brand kit to save.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/brand/kits" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "voice": [ "string" ], "palette": {}, "fonts": { "heading": { "family": "string", "weights": [ 100 ] }, "body": { "family": "string", "weights": [ 100 ] } } }'{ "id": "string", "name": "string", "tagline": "string", "voice": [ "string" ], "palette": { "primary": "string", "primaryForeground": "string", "secondary": "string", "secondaryForeground": "string", "accent": "string", "accentForeground": "string", "background": "string", "foreground": "string", "muted": "string", "border": "string", "destructive": "string" }, "fonts": { "heading": { "family": "string", "weights": [ 100 ] }, "body": { "family": "string", "weights": [ 100 ] } }, "logoAssetIds": [ "string" ], "contrast": { "passes": true, "pairs": [ { "foreground": "string", "background": "string", "ratio": 0, "level": "aa", "message": "string" } ], "failures": [ { "foreground": "string", "background": "string", "ratio": 0, "level": "aa", "message": "string" } ] }, "createdAt": "string", "updatedAt": "string"}List your brand kits GET
Returns the caller's brand kits, most recently updated first. Every kit carries its `contrast` report, recomputed on read, so a client can render the per-swatch badge without running the maths itself.
Read a brand kit GET
Returns one brand kit. A kit owned by another user answers with the same 404 as a kit that does not exist.