Turn the accessibility widget on or off
set_widget_enabledUse this when the user asks to switch the Inclusify accessibility widget on or off for a site — turning it on after setup, or taking it down while something is investigated. WRITES to this website's Inclusify configuration — never to the site's code or theme: it sets whether the widget bundle served to that site renders the widget or does nothing. Takes effect within about a minute; the edge cache is purged as part of the change. The two directions are treated differently on purpose. Turning it ON is applied immediately and needs no confirmation. Turning it OFF removes a live accessibility feature from real visitors of that site, so it REQUIRES CONFIRMATION — call without "confirm" first, show the user the preview, and only call again with the token once they have agreed — and the account owner is emailed a record of it with a link to undo it. Idempotent: if the widget is already in the state you asked for, nothing is written, nobody is emailed, and the response says so. This never uninstalls anything: on a Shopify store the widget is a theme app embed and turning it off here does not remove the embed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Leave this out on the first call to get a preview of exactly what would change, plus a confirmation token. Call again with the same arguments and that token to apply the change. The token lasts 10 minutes and works once. | |
| enabled | Yes | true renders the widget on the site; false serves a no-op bundle instead, so the widget disappears for that site's visitors. false requires a confirmation token. | |
| website | Yes | The website domain as registered in Inclusify, e.g. "example.com". |