Delete key

Removes an engine's API key from KMS.

DELETE /v1/websearch/engines/{name}/key

Addresshttps://api.hanzo.ai/v1/websearch/engines/{name}/key
MethodDELETE
Operationdelete_search_engine_key
AuthAuthorization: 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.

FieldInTypeRequiredDescription
namepathstringyesName is the engine, from the path.

Response

StatusBodyMeaning
200websearch.searchEngineKeyedok
defaultproblem-detailsrefused

200 body — 2 fields.

FieldInTypeAlwaysDescription
keyedbodyboolean—Keyed is whether a key is now held.
namebodystring—Name is the engine.

Failure carries the platform error shape — see Errors.

Examples

hanzo websearch engines key clear <name>
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"
         }
       }
     }'

Websearch API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.