Delete key
Removes an engine's API key from KMS.
DELETE /v1/websearch/engines/{name}/key
| Address | https://api.hanzo.ai/v1/websearch/engines/{name}/key |
| Method | DELETE |
| Operation | delete_search_engine_key |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Removes an engine's API key from KMS.
Searches stop using the key at once. Removing a key that is not held answers the same as removing one that is. 409 when the saved setting would be left with no engine that can answer — enable bing or ddg first.
SuperAdmin only. 404 for an engine that does not exist, 400 for one that takes no key, 503 when the settings store or KMS cannot answer.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the engine, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | websearch.searchEngineKeyed | ok |
default | problem-details | refused |
200 body — 2 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
keyed | body | boolean | — | Keyed is whether a key is now held. |
name | body | string | — | Name is the engine. |
Failure carries the platform error shape — see Errors.
Examples
CLI
SDK
HTTP
MCP
hanzo websearch engines key clear <name>.ts
.py
.go
.rs
.java
import { Configuration, WebsearchApi } from 'hanzoai';
const api = new WebsearchApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteSearchEngineKey({ name: 'name' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import WebsearchApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = WebsearchApi(client).delete_search_engine_key(name='name')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.WebsearchAPI.DeleteSearchEngineKey(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, websearch_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = websearch_api::delete_search_engine_key(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.WebsearchApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new WebsearchApi(client).deleteSearchEngineKey();curl -X DELETE https://api.hanzo.ai/v1/websearch/engines/<name>/key \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches websearch through the websearch tool, which names its 3 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_search_engines"
}
}
}'Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.