Turn auto-optimization on or off for a site
Enable or disable auto-optimization for one site, and optionally reconfigure which suggestion types are auto-applied and the confidence threshold they must clear. Requires the write:optimizations scope.
site_id and enabled are always required. auto_apply_types and confidence_threshold are optional and are only written when supplied — omitting them leaves the site's stored values untouched, so disabling never discards a configuration you can re-enable later.
The response echoes the RAW PERSISTED site settings, not the effective policy. GET /auto-optimization/status reports the effective values, which may be narrower because a saved workspace policy (Content Guard) intersects the allowed types and takes the stricter threshold. An empty auto_apply_types means nothing is applied automatically and every suggestion waits for review.
A site that does not exist in your organization, or is in the Trash, is reported as a 400 (Site not found) rather than a 404. Invalid suggestion types and an out-of-range threshold are also 400s, with the message naming the valid values.
CORS preflight is supported (OPTIONS returns 204; allowed methods POST, OPTIONS; allowed headers Content-Type, X-API-KEY).
Request
- Base URL: https://next.frase.io/api/v1
- URL: https://next.frase.io/api/v1/auto-optimization/toggle
- Auth: API key in header X-API-KEY
Request body
Response
Site settings persisted. Values are the raw stored site settings, not the workspace-narrowed effective policy.
Changes
No recorded changes to this operation across all 1 revision of this API.