Turn AI on or off for a site

update_site_ai_settings

Turns AI on or off for a site. Monthly caps are set for the whole workspace with update_workspace_spending.

Scopeconfig:writeMakes changes

The answer is the same as get_site_ai_settings. Any member of the workspace whose role has API access can turn AI on or off, like the switch in the AI tab.

AI is on from the start for every site. Turning it off makes every AI request of the site answer 403 within a minute, from the live site and the preview alike, so every AI feature of the site stops answering until it is turned back on. The history and the key are kept. The tool tells the client to confirm with you before turning AI off on a published site, because its visitors notice at once. See Turn AI off and on.

There is no cap per site. The workspace owner caps what the AI of every site spends together, and everything the workspace spends, in Settings > Spending, or with update_workspace_spending. See Spending caps and alerts.

Inputs

Input Type Required Description
projectId string Yes The site id.
enabled boolean Yes True to turn AI on, false to turn it off.