Delete identities
Takes one of the org's fabric identities out of the org.
DELETE /v1/network/identities/{id}
| Address | https://api.hanzo.ai/v1/network/identities/{id} |
| Method | DELETE |
| Operation | delete_network_identities_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Takes one of the org's fabric identities out of the org.
The identity's "org-<org>" role and every role scoped to the org are removed and the rest is left alone, so an identity another org shares keeps working there. The identity itself is deleted when no org role is left on it, or when the caller IS its IAM subject — a person may always remove themselves.
An id belonging to another org — or to nothing — is 404 before any write reaches the controller: whether an identity exists is itself a cross-tenant fact, and a delete may only ever act on what the caller could list, which for a plain member is its own identity. A fabric administrator is the controller's own and is refused.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the identity id from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
204 | — | no content |
default | problem-details | refused |
Failure carries the platform error shape — see Errors.
Examples
hanzo network identities rm <id>import { Configuration, NetworkApi } from 'hanzoai';
const api = new NetworkApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.deleteNetworkIdentitiesById({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import NetworkApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = NetworkApi(client).delete_network_identities_by_id(id='id')cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.NetworkAPI.DeleteNetworkIdentitiesById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, network_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = network_api::delete_network_identities_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.NetworkApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new NetworkApi(client).deleteNetworkIdentitiesById();curl -X DELETE https://api.hanzo.ai/v1/network/identities/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches network through the network tool, which names its 7 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_networks"
}
}
}'