Create a widget theme
/v1/widget/presetsSaves a new widget theme. Every colour, a name and a launcher label are
required; roundness defaults to 100.
Request body
application/jsonrequiredShown in the theme builder. At most 100 characters.
The launcher button's text. At most 40 characters.
Launcher button background. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Launcher button background on hover. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Launcher button text. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Typing indicator dots. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Selected options, links and emphasis. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Accent on hover. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Labels, placeholders and secondary text. A hex colour, like #FFFFFF or #FFF, with or without alpha.
What the stylist says, product names, prices. A hex colour, like #FFFFFF or #FFF, with or without alpha.
The background the conversation sits on. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Product cards, look panels and question cards. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Card outlines and dividers. A hex colour, like #FFFFFF or #FFF, with or without alpha.
The shopper's own messages and the message box. A hex colour, like #FFFFFF or #FFF, with or without alpha.
The strip behind the message box. A hex colour, like #FFFFFF or #FFF, with or without alpha.
Corner roundness for the whole widget, 0 (square) to 100 (as shipped).
Response
A saved widget theme, as stored.
Pass it to the embed, or to preflight, as themeId.
Shown in the theme builder.
The colours, grouped as stored.
When it was saved first.
When it was last changed.
Errors
23Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
Request body must be valid JSON.The body is not parseable JSON.
Request body must be a JSON object.The body is empty, an array, or a JSON primitive.
Validation failed.More than one field is missing or invalid. details names each one.
{
"error": "Validation failed.",
"details": [
{
"path": "pageColor",
"message": "pageColor is required."
},
{
"path": "accentColor",
"message": "Accent colour must be a hex colour, like"
}
]
}name is required.name is missing and nothing else is wrong. Each field has its own message, the same as in details.
curl -X POST "https://stylor.ai/api/v1/widget/presets" \
-H "Authorization: Bearer $STYLOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ranch",
"buttonLabel": "Ask a stylist",
"buttonColor": "#2D2926",
"buttonHoverColor": "#000000",
"buttonTextColor": "#FFFFFF",
"typingDotColor": "#999999",
"accentColor": "#B5651D",
"accentHoverColor": "#8A4B12",
"mutedTextColor": "#6B6B6B",
"primaryTextColor": "#2D2926",
"pageColor": "#FBF8F3",
"surfaceColor": "#FFFFFF",
"borderColor": "#E6E1DA",
"inputColor": "#F3EFE9",
"footerColor": "#FBF8F3",
"roundness": 60
}'{
"preset": {
"id": "7e6d5c4b-3a2f-4e1d-9c8b-7a6f5e4d3c2b",
"name": "Ranch",
"options": {
"button": {
"label": "Ask a stylist",
"color": "#2D2926",
"hoverColor": "#000000",
"textColor": "#FFFFFF"
},
"widget": {
"typingDotColor": "#999999",
"accentColor": "#B5651D",
"accentHoverColor": "#8A4B12",
"mutedTextColor": "#6B6B6B",
"primaryTextColor": "#2D2926",
"pageColor": "#FBF8F3",
"surfaceColor": "#FFFFFF",
"borderColor": "#E6E1DA",
"inputColor": "#F3EFE9",
"footerColor": "#FBF8F3",
"roundness": 60
}
},
"created": "2026-10-04T18:20:03.001Z",
"modified": "2026-10-04T18:20:03.001Z"
}
}