- It belongs to your account, the one your API key was made for, and it is the default for every widget the AI builds there. A customer’s editor session acts as your account, so what a customer builds in the widget creator you embed is built with your kit, and your customers need no kit of their own.
- There is one kit for your whole account, not one per customer. A managed user is a label on what you make, not an account. A call made for one managed user (with the
X-Managed-User-Idheader) is not accepted on these routes: it is refused with403andMANAGED_USER_SCOPE_ROUTE_NOT_AVAILABLE. - It is never part of a widget’s content. A kit decides how a widget looks, not what is in it: it never adds a title, a button or a photo to a widget.
WIDGETIC_PARTNER_KEY.
What a Kit Holds
Widgetic’s default kit is a green palette (Forest
#314F2F, Sage #7BA668, Sunny #F5CE5A, Coral #F55A5A, and white, mist and ink for the background, surfaces and text), Inter for every text, corner radii of 8, 12 and 15 px, and the style note “Widget backgrounds to be white whenever possible.”
What You Need
An API key. Looking at the kit needs theaccount:read scope. Changing it needs a key with full access, because a change reshapes every widget your account makes from then on. See Authentication.
Whose Kit a Key Works
- A key made for your account works your account’s kit. This is the case for a partner’s key.
- A key made for a team works the team’s kit, and no other: naming another team with it is refused (
403,not_a_member). To change the team’s kit, the person the key acts as has to be allowed to manage the team’s settings (403,not_allowed_to_editotherwise). - A key of a person’s own account may name one of that person’s teams with the
organizationIdquery parameter (GET /brand-kit?organizationId=...), when the person is an active member of it. - A managed user has no kit. See above.
Read Your Kit
Change Parts of It
PATCH /brand-kit changes the parts you send and leaves the rest as it was. This is the call to use for almost everything. Send at least one of colors, fonts, cornerRadius, spacing or instructions:
colorsreplaces the whole palette. To add a color, read the kit, add it to the list and send the list. An empty list goes back to Widgetic’s default palette.fontschanges the roles you name and leaves the others. Send the whole font for a role (family,sourceand, if you like,weight).cornerRadiusis one number. See Corner Radius.spacingchanges the steps you name:xs,s,m,landxl(0 to 128 px) and the three radiiradiusS,radiusMandradiusL(0 to 64 px). A radius step you send inspacingwins over the one made fromcornerRadius.instructionsare your style notes; an empty string removes them.expectedVersionrefuses the change with409(brand_kit_version_conflict) when the kit was saved again since you read that version.
colors, and a font you upload has to exist before a role uses it (see below).
PUT /brand-kit replaces the colors, fonts, spacing and notes with exactly what you send, in a body of the form { "tokens": { "colors": [], "fonts": {}, "spacing": { ... }, "instructions": "..." } } with every spacing step present. Use it to copy a kit from one environment to another; use PATCH to change one thing.
Your Own Fonts
Upload the file, then name its family in a role. A font file is awoff2, woff, ttf or otf file of at most 3 MB, and a kit holds up to 12 of them.
family and weight (100 to 900, in hundreds) are required, and style is normal (the default) or italic. The answer is the kit, with the file in assets, and the call answers 201. A family, weight and style can be uploaded once (409, font_variant_exists). Then use it:
400: upload first.
Your Own Icons
An icon is a name and an SVG. The name says what the icon means (cart, menu, arrow-right): a widget that needs that icon takes yours, by name, in place of a general-purpose one.
422 (svg_rejected). It may weigh up to 32 KB, a name is up to 48 letters, digits, spaces, hyphens or underscores and is used once in the kit (409, icon_name_taken), and a kit holds up to 100 icons. A widget draws the icon inline, so a part of it drawn with currentColor takes the color of the text around it: draw an icon that way if it should follow the widget’s colors.
Rename or Remove a Font or an Icon
Every file and icon has anid in assets:
Style Notes
instructions is a few lines in your own words that the AI reads for every widget, next to the palette and the fonts. They are for how a widget looks, so write them as a design rule:
Use the dark color as the background always and the light color for titles.Flat design: no shadows, no gradients.Backgrounds white whenever possible; the primary color only for buttons.
"") to have none.
Notes are only about how a widget looks. They add no element to a widget and never change what a request asks for, and where a request says something different, the request wins. A note that asks for anything but styling, such as another output format or hidden text, is not followed.
Corner Radius
cornerRadius is one number: the radius of a card, in pixels. The small and the large radii of a widget are made from it, so one value is enough to make a whole kit round or square:
Pass
spacing.radiusS, spacing.radiusM or spacing.radiusL as well when you want one of the three to differ from what the number makes.
How a Widget Uses the Kit
- A request wins over the kit. When the person who asks for a widget names a color, a font or a look in their request (“a red button”, “use Georgia”), the widget follows the request, and the kit fills in everything the request left open.
- At most two palette colors at a time. Besides the background and the text, a widget shows no more than two colors of the palette together, and text is set in the dark color, so a widget looks like one brand and not like the whole palette.
- Text is readable. The AI pairs colors from a table of their contrast (WCAG), and does not set text on a background that gives less than 4.5:1. A palette that cannot give that, such as light-grey text on white, is saved as you sent it and comes back with a line in
warnings:
- A change reaches new work only. A widget is made with the kit as it is when it is built or revised. Widgets that already exist, and the ones already published, keep their look until someone revises them.
Go Back to the Default
isDefault: true). Widgets that already exist are not touched.
Limits
Errors
The answer is the usual error body; thecode tells which:
Other Ways to Set the Same Kit
A kit is one thing with several doors:- The account holder can set it on widgetic.com, under Settings, Brand Kit, where colors, fonts and icons are shown, and where a Figma design link can be read into a draft.
- A person who connects an AI assistant to Widgetic can ask it to read or change their own kit: see the
get_brand_kitandupdate_brand_kittools. - Each call above is a command of the Widgetic CLI and a method of the SDKs, so a script can set the kit from a deploy.