Revoke turns off tokens that have already been issued.
Revoke turns off tokens that have already been issued.
POST /v1/licensing/revoke
| Address | https://api.hanzo.ai/v1/licensing/revoke |
| Method | POST |
| Operation | post_licensing_revoke |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Revoke turns off tokens that have already been issued.
A signed token cannot be un-signed, so revocation is the only way to withdraw one: this appends an entry that verify and the license-gated download both consult. It is a POST rather than a DELETE because it APPENDS a durable, attributed record — the entry names the admin who recorded it and when — rather than removing one.
Org-admin only. Scope it as narrowly as the incident allows: "nonce" for one leaked token, "holder" for one compromised account, "fingerprint" for one stolen machine, "release" when a whole build is bad.
Request
3 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
reason | body | string | — | Reason is the operator's note, echoed back by verify so a support agent can explain the refusal. |
scope | body | string | yes | Scope is what the revocation matches on: "nonce" kills one token, "holder" every token issued to one bearer, "fingerprint" every token bound to one device, and… |
value | body | string | yes | Value is the concrete nonce, holder, fingerprint or release id to revoke. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | licensing.RevokeResponse | ok |
200 body — 7 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
entry | body | licensing.RevocationEntry | — | |
entry.at | body | integer | — | |
entry.by | body | string | — | |
entry.reason | body | string | — | |
entry.scope | body | string | — | |
entry.value | body | string | — | |
revoked | body | boolean | — | Revoked is always true — a failure is an error status, not a false here. |
Failure carries the platform error shape — see Errors.
Examples
hanzo licensing revoke \
--scope <scope> \
--value <value>import { Configuration, LicensingApi } from 'hanzoai';
const api = new LicensingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postLicensingRevoke({ scope: "<scope>", value: "<value>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LicensingApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LicensingApi(client).post_licensing_revoke(scope="<scope>", value="<value>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.LicensingAPI.PostLicensingRevoke(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, licensing_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = licensing_api::post_licensing_revoke(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LicensingApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new LicensingApi(client).postLicensingRevoke();curl -X POST https://api.hanzo.ai/v1/licensing/revoke \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scope": "<scope>",
"value": "<value>"
}'The door reaches licensing through the licensing tool, which names its 11 operations with its own verbs — this one among them, under a name only the door 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": "get_licensing_download"
}
}
}'How is this guide?