Delete kv — DELETE /v1/kv/{bucket}

Removes one bucket of the caller's org — every key and every revision with it — and answers 204 with no body.

DELETE /v1/kv/{bucket}

Addresshttps://api.hanzo.ai/v1/kv/{bucket}
MethodDELETE
Operationdelete_kv_by_bucket
AuthAuthorization: Bearer $HANZO_API_KEY

Removes one bucket of the caller's org — every key and every revision with it — and answers 204 with no body. 404 when the org has no bucket of that name.

Request

1 field.

FieldInTypeRequiredDescription
bucketpathstringyesBucket is the bucket's name, from the path.

Response

StatusBodyMeaning
204—no content
defaultproblem-detailsrefused

Failure carries the platform error shape — see Errors.

Examples

hanzo kv rm <bucket>
import { Configuration, KvApi } from 'hanzoai';

const api = new KvApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteKvByBucket({ bucket: 'bucket' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import KvApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = KvApi(client).delete_kv_by_bucket(bucket='bucket')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.KvAPI.DeleteKvByBucket(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, kv_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = kv_api::delete_kv_by_bucket(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.KvApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new KvApi(client).deleteKvByBucket();
curl -X DELETE https://api.hanzo.ai/v1/kv/<bucket> \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool kv, op delete_kv_by_bucket — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "kv",
         "arguments": {
           "op": "delete_kv_by_bucket",
           "input": {
             "bucket": "<bucket>"
           }
         }
       }
     }'

KV API · All Hanzo APIs · Interactive reference

Was this page useful?