Set a virtual key's tool-scan action
/v1/virtual-keys/{slug}/tool-scanSet a virtual key's tool-scan action.
Sets what the tool-result scan does on this key's requests: MONITOR, REDACT or BLOCK. {"action": null} goes back to the platform default. A body without action ({}) changes nothing and answers the current setting.
Requires an organization admin key, or a workspace admin key for the key's workspace.
Errors: 403 without the required role; 404 when no key has this slug.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Path parameters
slugstringrequiredthe key's slug
Request body application/json
the action to set
actionenum<string>What the scan does when a tool result matches:
MONITORrecords it,REDACTremoves the matched text before the model reads it,BLOCKrefuses the request with 422.nullmeans the platform default.One of
"MONITOR","REDACT","BLOCK"
Responses
virtual_key_slugstringThe virtual key's slug (
vk-...).actionenum<string>The key's own action; absent when the key uses the platform default.
One of
"MONITOR","REDACT","BLOCK"effective_actionenum<string>What the scan does on this key's requests:
action, elsedefault_action.One of
"MONITOR","REDACT","BLOCK"default_actionenum<string>The platform default, used when the key sets no action of its own.
One of
"MONITOR","REDACT","BLOCK"