# Toggle Test Automatic Threshold https://api-docs.lumar.io/docs/protect/automatic-threshold/toggle-test-automatic-threshold The following mutation toggles automatic threshold on a test: ```graphql mutation ToggleTestAutomaticThreshold( $testId: ObjectID! $automaticThresholdEnabled: Boolean! ) { updateTest( input: { testId: $testId automaticThresholdEnabled: $automaticThresholdEnabled } ) { test { id automaticThresholdEnabled } } } ``` :::caution - This makes sense only when `automaticThreshold` is enabled on the test's test suite and `automaticThresholdEnabledForAll` is set to `false` on the test's test suite. - Having `automaticThresholdEnabledForAll` set to `true` will update the threshold on all tests on that test suite, no matter the value of `automaticThreshold` test flag. :::