Update widget settings
/v1/widget/settingsenabled: false hides every widget (the chat and complete the look)
on every store from the next page view; an open chat hides itself on
its next message. It is not cached anywhere. The chat API called
without a widget session is unaffected.
holdoutPercent sets the share of visits that never see the chat
widget, a whole number from 0 to 50. Any change of share ends the
running test and starts a new one with a new id (visits split at
one share cannot be pooled with another); the ended test moves to
pastHoldouts, newest first, and its results stay readable. 0 ends
the test. The same share again changes nothing.
Request body
application/jsonrequiredShow the widgets (true) or hide them everywhere (false).
The share of visits kept from the chat widget, in percent. 0 ends the test.
Response
false when every widget is switched off.
The running holdout test, or null.
Option 1: WidgetHoldout
The test.
The share of visits kept from the chat widget.
When the test started.
When it ended. Only on pastHoldouts.
Option 2: null
Tests that ended, newest first (the last 20).
The test.
The share of visits kept from the chat widget.
When the test started.
When it ended. Only on pastHoldouts.
Errors
22Every 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.
The holdout changed while this was being saved. Load the settings again and retry.Another change to the holdout was saved at the same moment.
Validation failed.Neither field was sent, enabled is not a boolean, or holdoutPercent is not a whole number from 0 to 50. details names each.
curl -X PATCH "https://stylor.ai/api/v1/widget/settings" \
-H "Authorization: Bearer $STYLOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'{
"enabled": true,
"holdout": {
"id": "hold_3f9a1c2b7d4e5f60",
"percent": 10,
"startedAt": "2026-11-04T12:00:00.000Z"
},
"pastHoldouts": []
}