Skip to main content

Create Widget Style

Creates a styling preset for the current node. The returned id is what you pass to the widget as widgetStyleId.

Authentication: Bearer token required.

Endpoint: POST /api/v2/widget-styles


Request Body

FieldTypeRequiredDescription
namestringYesmin 1, max 255. Unique per node
primary_colorstringYesmax 32. CSS color (#3b82f6, rgb(...))
secondary_colorstringYesmax 32
background_colorstringYesmax 32
surface_colorstringYesmax 32
text_colorstringYesmax 32
muted_text_colorstringYesmax 32
border_colorstringYesmax 32
font_familystringYesmax 255. CSS font-family value
font_size_baseintYespx. min 8, max 32
font_size_headingintYespx. min 10, max 64
font_weight_headingintYesmin 100, max 900
border_radiusintNopx. min 0, max 64. Default 0
custom_cssstringNomax 32768. Raw CSS appended after generated variables — last write wins

Response — 201 Created

Returns the created WidgetStyleResponse (same shape as Get Widget Style).

StatusDescription
400Validation error
401Unauthorized
409A style with this name already exists for the node